cancel
Showing results for 
Search instead for 
Did you mean: 

Fail to send work item

Former Member
0 Kudos

Hi,

I have a workflow with 2 steps (say step1 and step 2) (user decision). Each step has hardcoded user (agent) assigned to the step level and task level

There is 'confirm end of processing' for both steps.

Even if first user confirms end of processing, it is not proceeding to 2nd 'user decision' step and work item is not sent to 2nd user.

I have checked and everything looks fine (agent assignment etc)

if the order of these steps is step1 and step2, work item for step1 is sent to user attached to it.

if the order of these steps is step2 and step1, work item for step2 is sent to user attached to it.

so individually these steps(tasks) have no problem with agent assignment etc.

But in either case 2nd work item is not sent to user.

Please help me.

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

former_member185167
Active Contributor
0 Kudos

Hello,

Just look in the workflow log (SWI1), you will see exactly what happened.

How is the workflow defined? After Step 1 it continues directly to Step 2?

They're not in separate branches of a fork?

regards

Rick Bakker

hanabi technology

Former Member
0 Kudos

Hi Rick,

These are the only 2 steps in the workflow and no other steps.

In SWI1, workflow log, it shows that the step1 is processed but it has not proceeded to step2 in both cases irrespective of order of steps.

Thanks!

former_member185167
Active Contributor
0 Kudos

Hello,

Workflow only has step 1 and step 2. Both user decision steps. Both with 'Confirm end of processing'.

How many outcomes are defined for each step? Are you using SBWP or UWL?

So the status of the first step is COMPLETED and the workflow is still in status STARTED but it hasn't progressed to the second step? What if you delete the 2nd step and replace it with a copy of the first?

Strange.

regards

Rick Bakker

hanabi technology

Former Member
0 Kudos

Hi Rick,

This is straight forward one with both the steps having just 1 outcome.

I am using SBWP to check work items

Status of 1st step is shown as completed but 2 nd step not started.

Even if I delete the 2nd step and copy 1st step, it is stopping after the step1. Not proceeding to next step irrespective of what the step is.

Thanks!

former_member185167
Active Contributor
0 Kudos

Hello,

Are you having this problem in any other workflows?

What if you remove 'confirm end of processing'? I assume you are confirming the end of processing.

Maybe you could upload a screenshot of the workflow log (chronological view) to one of the websites people use for that and provide a link here.

regards

Rick Bakker

hanabi technology

Former Member
0 Kudos

Hi,

In addition to this I have one more query.

I need to trigger this workflow programatically.

Business object has only one key field.

I am passing that key field, object type and event to swe_event_create

when I execute this, sy-subrc is returned as 0 but event container is empty and workflow is not triggered.

But when I use SWUE and give the same details, workflow is triggered ( no problem with event linkage etc)

When I use BDC to SWUE, it is getting triggered but I think that is not a good option and normally we use swe_event_create.

May I know what is the problem.

Here is the code:

data: gv_objkey type SWEINSTCOU-OBJKEY.

PARAMETERS: P_PERNR TYPE PERSNO.

  • DATA Container

DEFINE swc_container.

data begin of &1 occurs 0.

include structure swcont.

data end of &1.

END-OF-DEFINITION.

  • Create Container

DEFINE swc_create_container.

clear &1.

refresh &1.

END-OF-DEFINITION.

SWC_CONTAINER EVENT_CONTAINER.

SWC_CREATE_CONTAINER EVENT_CONTAINER.

gv_objkey = p_pernr.

CALL FUNCTION 'SWE_EVENT_CREATE'

EXPORTING

OBJTYPE = 'ZPCARD_BO1'

OBJKEY = gv_objkey

EVENT = 'CITI_FILE_RECEIVED'

  • CREATOR = ' '

  • TAKE_WORKITEM_REQUESTER = ' '

  • START_WITH_DELAY = ' '

  • START_RECFB_SYNCHRON = ' '

  • NO_COMMIT_FOR_QUEUE = ' '

  • DEBUG_FLAG = ' '

  • NO_LOGGING = ' '

  • IDENT =

  • IMPORTING

  • EVENT_ID =

  • RECEIVER_COUNT =

TABLES

EVENT_CONTAINER = EVENT_CONTAINER

EXCEPTIONS

OBJTYPE_NOT_FOUND = 1

OTHERS = 2.

IF SY-SUBRC <> 0.

message e000(z000) with 'Error creating event'.

ENDIF.

Former Member
0 Kudos

Hi,

Even if I remove 'confirm end of processing', I am having the same issue.

Workflow log doesn't say much. It shows the green line (processed part) till the first step and shows the first user as agent.

2nd step is not started. Hence no agent is shown and no green line.

Thanks!

former_member185167
Active Contributor
0 Kudos

Hello,

Please upload the screenshot.

Use SAP_WAPI_CREATE_EVENT, not SWE_EVENT_CREATE. You should always use SAP_WAPI* when it's available.

regards

Rick Bakker

hanabi technology

Answers (1)

Answers (1)

Former Member
0 Kudos

Thanks Rick.

The function module suggested by you is working perfect.

Even the other issue is resolved. The problem was 'CONFIGURATION ISSUE' in SWU3.

When you raised a point that 'are the other workflows working fine?', I have tested others and even they are stopping after first step. When I tested them in other system which is configured properly, they are working fine. Even my workflow was working fine in other system.

Finally issue is resolved. Thanks for your support.

Regards

Vasu

former_member185167
Active Contributor
0 Kudos

Hello,

I'm glad to hear it. Thanks for the follow-up.

But: what exactly was the configuration issue? How was it resolved?

if other people in the future have the same problem and find this thread, what advice would you give them?

regards

Rick Bakker

hanabi technology

Former Member
0 Kudos

Hi Rick,

Missing configurations in SWU3 are

-> Activity 'schedule background job for conditional evaluation' (requires activity 'configure RFC destination' as a prerequisite)

Both these activities are under 'maintain runtime environment' section of swu3

Regards

Vasu