cancel
Showing results for 
Search instead for 
Did you mean: 

Inactive workflow starting new workitems

cibeleaguiar
Explorer
0 Kudos

Hello experts,

I have two workflow models for the object BUS2104 (Appropriation Request). One is the standard WS00300022 and the other is a customized one (WS90000010).

The standard model WS00300022 has the event linkage deactivated, whereas the customized one has the activated linkage. Both to the same event TO_BE_APPROVED.

When the Appropriation Request triggers TO_BE_APPROVED event for the first time, the customized workflow starts, as expected.

Sometimes (not always and around 5%), when the user sends the Appropriation Request for second or third times to approval again, the same document starts the standard workflow, but the linkage to this one is deactivated.

I go for Event Simulation and it gives me the following results:

Event Simulation

Object types concerned:

     -> BUS2104

Potential tasks to be started:

 

     -> Successfully started

          -> WS90000010

               -> Result dependent on a check function module

 

     -> Not started

          -> WS00300022

               -> Link to the event is deactivated

               -> Result dependent on a check function module

Any tips?? Thank you in advance

Accepted Solutions (1)

Accepted Solutions (1)

SandySingh
Active Contributor
0 Kudos

Hello

Can you check the Transaction SWELS to see if the TO_BE_APPROVED event triggers theWS00300022 template. Also check if this WF is active in Unit test client. You have a Development client where this workflow might be deactivated but in Unit test client , it might be active; check transaction SWE2

There is also a possibility that WS00300022 is entered in the SPRO configuration.

I also found a interesting thread that says this WF template cannot be copied and SAP standard code has hard coding for WS00300022' refer below. Few SAP notes are also mentioned.


Hope it helps.

Appropriation Request workflow cannot be copied? | SCN

CALL FUNCTION 'SWE_EVENT_REC_TYPE_READ'

       EXPORTING

            OBJTYPE       = 'BUS2104'

            EVENT         = 'TO_BE_APPROVED'

            RECTYPE       = 'WS00300022'

       IMPORTING

            TYPE_COUPLING = L_COUPLING

       EXCEPTIONS

            READ_FAILED   = 1

            OTHERS        = 2.

Regards

Sandy

Message was edited by: Sandy !

Answers (4)

Answers (4)

nishantbansal91
Active Contributor
0 Kudos

Dear Cibele,

Please check the where to use of Function module SAP_WAPI_START_WORKFLOW in DEV system in your component.

Thanks

Nishant

former_member186746
Active Contributor
0 Kudos

Hi,

If I were you I would check Mike's suggestion.

First make sure that the workflow template was not started directly, through a function module like SAP_WAPI_START_WORKFLOW. Or that it is used as a subflow in another workflow.

Kind regards, Rob Dielemans

mohit_bansal3
Active Participant
0 Kudos

Hi Cibele,

Could you Please share the screen shot of SWIA , how standard workflow is triggering from second/ third approval.

Regards,

Mohit Bansal

anjan_paul
Active Contributor
0 Kudos

Hi,

  Please share the SWE2 Linkage screenshot.

cibeleaguiar
Explorer
0 Kudos

I don't have permission to use SWE2 in production system, since it can modify a linkage. But I'll try to have it because I think it won't allow any modification in production system anyway. It may allow me to see the linkage status.

The following image shows the result of Event Simulation. This simulation is obtained from SWUD using the WS00300022 workflow.

pokrakam
Active Contributor
0 Kudos

Check the technical log for one of the standard workflows to see whether it was even started by an event. Your custom ones will have a log entry "Start Event Received". If not then it was started directly.

anjan_paul
Active Contributor
0 Kudos

hi,

  Also please share the code written in Check FM .

cibeleaguiar
Explorer
0 Kudos

It is true, the customized one has the log entry "Start Event Received", but the standard has "Workflow started". How can it happen if the user has not access to SWUD? I believe the user started a new workflow using the command "For approval".

cibeleaguiar
Explorer
0 Kudos

The check FM is the standard  aia1_wf_approval_check