cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

workflow error:Agent assignment

former_member249671
Participant
0 Likes
1,309

Hi All,

I am running a program which uploads files from presentation server.For each uploaded file ,each workflow will be triggered using FM SAP_WAPI_START_WORKFLOW. Inside the step of a workflow,we have used Rule with responsibilities to identify an agent.From past few days whenever the program runs for multiple files ,every simultaneous workflow goes to error and in log it shows as rule unable to fetch agents.

suppose if i upload 5 files: for 1,3,5 workflow will be Inprocess and 2,4 is in error. if i run the program for each file separately,it is running successfully.I could successfully restart the error ed ones from SWPR. when I simulate the rule ,agents are showing up successfully.

This issue only occurs in Pre-production currently and doesn't show up in quality server also.

can any one advise,why error occurs for every other document even though agents are maintained correctly?

please refer attachment for error

View Entire Topic
I042439
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Sunil

How is the Company Code Determined in the workflow? Is it a BO Attribute (Virtual? DB?)? or Passed in Event Container? Or determined from a step in the workflow and then used in the rule in later steps.

This seems to be a timing issue that the the workflow is not able to get the company code on time (when multiple files are executed in a succession). When you debug, system gets enough time to save entries in the DB. You may see the company code in the workflow container later on (as part of the BO Attribute...if it is..... and that's because when you open the WF log, the BO code is executed again)

What does you program does? Only uploads files and pass them to workflow? Or process these files and does some postings also?

can you please detail the steps from execution of the program to triggering of the workflow to the actual point where the rule is called. We need to know the deails of everything in between.

Regards,

Modak

former_member249671
Participant
0 Likes

Basically program uploads the files ( Invoices) in the presentation server ( File path will be given at Selection-screen) and stores in documentum server and it geneartes a document number  after reading each file and saves in Ztable then eventually workflow will be triggered using SAP_WAPI_START_WORKFLOW.

Workflow has 3 condition branches before a dialog step. workflow is errored out because of agent assignment issue. but it has agents maintained and when i run in debugging mode for 2 files still it gives error. when i run the same file individually.it is working fine.

Thank you.

I042439
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Sunil

You simply repeated the issue.... but i am asking about the process.

Your rule is company code based. How is the company code determined in the workflow?

Regards,

Modak

former_member249671
Participant
0 Likes

Company code value is passed from program to container using INPUT_CONTAINER of FM SAP_WAPI_START_WORKFLOW. I could see company code value in workflow container also.

Former Member
0 Likes

If you run the same input again after removing the first file, do the same ones go into error or is it now reversed?

I042439
Product and Topic Expert
Product and Topic Expert
0 Likes

Please share the code of event trigger ...especially covering the aspect where company code is determined (from the file or DB).