Friday, 6 August 2021

AIS information generation / Form Compare / JDE environment compare

I want to talk you through a utility that I'm starting to use more and more, that is the AIS information generation node application. Wow, that is almost poetic.  

The application itself is fairly simple, but it has some really powerful uses.  I have blogged about this a long time ago - but the usage was a little unclear - so I thought that I would try agian.

I'll let you know specifically what is does, and then talk you through the use cases.

The java script iterates through all of the controls of a form (that are exposed via AIS) and compares them to a second environment...  So you can configure two JDE environments in a config file, run this code and it will tell you what controls are the same and what controls are different...   It will also tell you all of the controls on a form...  Wait... this sounds really handy.

So... Let me get this straight.  If I wanted to compare two JD Edwards environments (PY and PD) and see of all of the controls on a form were the same - at a very detailed level - I could do this?  YES!

Could I also use this to compare a complete system code - lots of forms - YES you could...

Do you mean that if I ran this after a full package deploy, this would actually generate all of the serialized objects for the JDE forms that I choose - YES - it could even do that for you.

What if I wanted to test column security - well, yes - this is going to tell you all the controls that the user can see - it's going to do that also!

Oh dear, this sounds like a very useful utility - YES it is.

I do a lot of debugging and troubleshooting (yes still, and yes I enjoy it) and this has helped me in so many situations.  Another use case is when I'm doing any AIS direct integrations (not orchestrations), I have a really quick way of getting all of the form controls and their internal AIS ID's into a CSV file.  This is really handy when I'm coding and hacking around.

How does this magic work you ask?

Firstly, you need to reach out and ask me for the file - I don't want to make it publicly available.  Sure, that is nasty - but I'm pretty friendly.

You unzip the contents of the file onto your machine:

restore the package from the zip file

install node - from here https://nodejs.org/en/download/

goto your restore dir from before with command prompt

 


C:\temp\ais-compare-cli-master

>npm i 

--This will install dependencies

Once this is complete 

C:\temp\ais-compare-cli-master>node app --help

  Usage: app [options] [command]

  Commands:

    compare <formName> [additionalFormNames...]  Compare two different forms.

    Example compare P4210_W4210A --format csv --out P4210_W4210A.csv

  Options:

    -h, --help         output usage information

    -V, --version      output the version number

    --format <format>  Specify the output format. Allowed: "csv,json" (default: json)

    --out <file>       Write to a file instead of the command line


 Config is in

C:\temp\ais-compare-cli-master\config\default.yaml


The config is really simple 

C:\temp\ais-compare-cli-master\config>type default.yaml

servers:

  - url: https://f5play.fusion5.cloud

    username: SX00001

    password: myPAssW0rd


  - url: https://f5dv.fusion5.cloud 

    username: SX00001

    password: myPAssW0rd


What the above is telling you is that it's going to compare f5dv with f5play using the credentials that you specify.

It'll provide you with output like this:
P42101_W42101A,101[],title,true,Deliver To,Deliver To
P42101_W42101A,101[],presence,true,true,true
P42101_W42101A,101[],dataType,true,9,9
P42101_W42101A,101[],editable,true,false,false
P42101_W42101A,101[],longName,true,mnDeliverTo_101,mnDeliverTo_101
P42101_W42101A,101[],visible,true,true,true
P42101_W42101A,102[],title,true,Pull Signal,Pull Signal
P42101_W42101A,102[],presence,true,true,true
P42101_W42101A,102[],dataType,true,2,2
P42101_W42101A,102[],editable,true,false,false
P42101_W42101A,102[],longName,true,sPullSignal_102,sPullSignal_102
P42101_W42101A,102[],visible,true,true,true
P42101_W42101A,103[],title,true,Ship To Attention,Ship To Attention
P42101_W42101A,103[],presence,true,true,true
P42101_W42101A,103[],dataType,true,2,2
P42101_W42101A,103[],editable,true,false,false
P42101_W42101A,103[],longName,true,sShipToAttention_103,sShipToAttention_103
P42101_W42101A,103[],visible,true,true,true
P42101_W42101A,104[],title,true,Ship To Contact Sequence ID,Ship To Contact Sequence ID
P42101_W42101A,104[],presence,true,true,true
P42101_W42101A,104[],dataType,true,9,9
P42101_W42101A,104[],editable,true,false,false
P42101_W42101A,104[],longName,true,mnShipToContactSequenceID_104,mnShipToContactSequenceID_104
P42101_W42101A,104[],visible,true,true,true
P42101_W42101A,261[],title,true,Pending Order Status,Pending Order Status
P42101_W42101A,261[],presence,true,true,true
P42101_W42101A,261[],dataType,true,2,2
P42101_W42101A,261[],editable,true,false,false
P42101_W42101A,261[],longName,true,sPendingOrderStatus_261,sPendingOrderStatus_261
P42101_W42101A,261[],visible,true,true,true


Which you can sed and awk and coerce into the value that you need.

I'm going to put this on a website soon, so that you don't need to download it - you can just run it free!

ps. I did not write any of this code, I needed a lot of help.


No comments:

Extending JDE to generative AI