Skip to main content

Posts

Showing posts with the label Workflow

Sort Vote Time in Descending Order for Signoffs in Aras Innovator

By default, signoffs are sorted by vote time in ascending order. That means the latest record will be at the bottom. It is hard to check the newest information if there is a lot of records, and the "Vote Now" link will also be at the bottom Signoff page is rendered by running a Report named "Workflow Process History". And a Report Item can define style sheet for output. Therefore, open the style sheet of Workflow Process History and find sort definition at line 189 (shown in Figure 1), there are 2 conditions: Sort "state" in descending order. For a valid Workflow Process, there are only 2 kinds of Life Cycle State for Activity -- Active/Closed. So, according to alphabetical order, "Closed" will be sorted before "Active". Sort "closed_on" in ascending order. In order to sort by vote time, date string should be split into numbers. Using XSLT function -- substring -- can extract all these numbers. And then, they could be s...

Delete Workflow Process in Aras Innovator

When initiating a Workflow Map, a new Workflow Process and Workflow will be created. Workflow is a Relationship for recording the dependency of Workflow Process. That means Workflow Process cannot be deleted once source Item exits due to Relationship constraint. As for subflow, it is a kind of Workflow Process. But in the background, system will record which Activity starts the subflow. With above conditions, error message like Figure 1 and Figure 2 will show when trying to delete a Workflow Process. Figure 1. Error message of while deleting Workflow Process but source Item exists. Figure 2. Error message of while deleting Workflow Process but it has subflow. Therefore, deletion needs the following steps: Delete source Item. Delete subflow (if has). Delete Workflow Process.

Fix Workflow Activity List Variable Data Value in Aras Innovator

In Aras Innovator, List Value contains "Label" and "Value" to respectively indicate "text" and "value" of HTML select element. Instead of the "value" of list option, Activity Variable Value is written with the "text" of list option while voting (shown as Figure 1). This may cause programming mistake or wrong multilingual text. Figure 1 Solution Open "\Innovator\Client\scripts\InBasket\InBasket-VoteDialog.apsx". Find JavaScript function "processVote" (default at line 588). Move to if statement which handles variable type check (default at line 679, shown as Figure 2). Change "options[...].text" to "options[...].value" (default at line 681, circled at Figure 3). Save file. Figure 2 Figure 3

Fix Workflow Activity List Variable Required Value in Aras Innovator

In Workflow Map, Activity Variable could be set default value and specified if it must be filled out before submitting. Normally, the list option may be ignored if it has default value. So, configuration will be set as Figure 1, default value is blank and checks "Required". But actually, list variable is already set while vote dialog opens (shown as Figure 2). That makes required setting useless and users are not necessary to review list options. Figure 1. Variable setting of Workflow Activity. Figure 2. Vote dialog variables. The reason is vote dialog does not handle this action (HTML will use first option as default if there is no any treatment). Therefore, "InBasket-VoteDialog.apsx" need to do some modification. Solution Open "\Innovator\Client\scripts\InBasket\InBasket-VoteDialog.apsx". Find JavaScript function "populateVariables" (default at line 187). Move to if statement which handles variable type check (default at lin...

Start Workflow by AML in Aras Innovator

ItemType must has relationship of target Workflow Map, otherwise server will return error after executing AML. Instantiate Workflow Below syntax will create a new Workflow Process and server will return a new ID for it: <AML> <Item type=" Source ItemType " id=" Source Item ID " action="instantiateWorkflow"> <WorkflowMap> Workflow Map ID </WorkflowMap> </Item> </AML> After created Workflow Process, source item should be linked with it. Below syntax will create relationship for them: <AML> <Item type="Workflow" action="add"> <source_type> Source ItemType </source_type> <source_id> Source Item ID </source_id> <related_id> Workflow Process ID </related_id> </Item> </AML> Start Workflow Above steps only "create" but not "start", the new Workflow Process need to be launched manually with be...