Skip to main content
Solved

Workflow - Release Customer Order

  • 19 January 2024
  • 5 replies
  • 295 views

Hello All,

 

I’m trying to build a simple workflow to Release a CO when a certain Order Type is used.

Before starting with the workflow, I debugged the Release operation to know exactly which Projection to invoke:

QuickOrderFlowHandling.svc/ProcessOrders
{"Selection":"ORDER_NO=11691^","StartEvent":"20","CreateRentalTrans":null}

I’ve built my Selection variable exactly as needed, but I still get an error even if I believe the arguments passed should be OK.

"ORA-20181: QuickOrderFlowHandling.ACCESS_FAILURE: Arguments used to execute current operation are not allowed.\nORA-06512: at \"IFSAPP.ERROR_SYS\", line 140\nORA-06512: at \"IFSAPP.ERROR_SYS\", line 685\nORA-06512: at \"IFSAPP.QUICK_ORDER_FLOW_HANDLING_SVC\", line 3647\nORA-06512: at \"IFSAPP.QUICK_ORDER_FLOW_HANDLING_SVC\", line 2952\nORA-06512: at \"IFSAPP.QUICK_ORDER_FLOW_HANDLING_SVC\", line 1423\nORA-06512: at line 2\n",

 

 

The CO that I’m debugging with is Planned, so release is possible:

 

I would really want this WF to work, otherwise I will create a custom event with a PL/SQL block of code.

5 replies

Userlevel 4
Badge +7

There is an issue with the way you are referring the variables 

you need to use execution.getVariable to get the reverent variable to the code. and since you are using Result variable and the code line seems to be a one liner, no need to declare the js variable using var key word. 

for eg:

 

alternatively, you can also use execution.setVariable(<variable name>, <value variable>)l to set variables. 

eg:

 

 

In the Projection delegate task you need to use expression language syntax to refer the variable 

eg: 

 

Userlevel 7
Badge +18

@kamnlk thanks for the response. I have managed to get further, but unfortunately there’s a rollback inside the routine and therefore I can’t use WF for this purpose. I guess I’m gonna stick with the PL/SQL event action.

"ORA-00034: cannot ROLLBACK in current PL/SQL session\nORA-06512: at \"IFSAPP.CUSTOMER_ORDER_FLOW_API\", line 2686\nORA-00034: cannot SET SAVEPOINT in current PL/SQL session\nORA-06512: at \"IFSAPP.CUSTOMER_ORDER_FLOW_API\", line 2318\nORA-06512: at \"IFSAPP.CUSTOMER_ORDER_FLOW_API\", line 2107\nORA-06512: at \"IFSAPP.CUSTOMER_ORDER_FLOW_API\", line 4890\nORA-06512: at \"IFSAPP.CUSTOMER_ORDER_FLOW_API\", line 2870\nORA-06512: at \"IFSAPP.QUICK_ORDER_FLOW_HANDLING_SVC\", line 2967\nORA-06512: at \"IFSAPP.QUICK_ORDER_FLOW_HANDLING_SVC\", line 1423\nORA-06512: at line 2\n",

 

 

 

Userlevel 1
Badge +7

We are attempting something similar where we use the Internal Input Variable to obtain the user. When using these methods above we can see the value that is passed into the workflow when inspecting.

 

However, for whatever reason the value from the Internal Input Variable is not written to the database.

 

WF:

 

 

A new record is added to the database, so we know it is not erroring.

 

The issue we are having is the variable for User_ is always null when written to the database

We can hardcode the value as an uppercase or lowercase and it will insert fine...but not when the value is passed from the script

 

Result:

 

Any ideas what we are missing?

I am not certain but is this where a Projection Delegate Task should be used? 

Userlevel 4
Badge +7

@PhillBronson Can you give bit more context about this workflow?

how is the workflow triggering? event/projection action? 

how is the custom projection configured?

 

also, on a side note ifsBpaExecutionUserId is getting deprecated from 24r1 onwards ref: techdocs link

Note: This variable will be deprecated from 24R1. The variable ifsBpaCurrentUserDirectoryId is introduced to replace this variable.

Userlevel 1
Badge +7

It was triggered via ExecuteWorkflow command

the projection had a custom action associated from a custom utility

the workflow was used to gather the user and call the associated custom action

 

another resource told me, Internal Input Variables can only be used in event and projection actions.

I havent found the documentation for this rule

 

The solution to get user in the database was something like this:

 

However, we had to abandon it. Workflow limitations...

Reply