cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow getting de activated

former_member214498
Contributor
0 Kudos

Hi

I created a custom event 'ItemCreated' for object type MSEG.

However, whenever a item is created in MM transaction, the event is getting created which I can see in event trace but the workflow does not get triggered and event linkage gets deactivated as well in the workflow.

I am getting the following feedback in event trace:

Workflow definition of task 'WS91100019' cannot be activated

Please let me know how to fix this.

Regards

Waz

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I'm wondering if at the time of triggering the ItemCreated event, if the data has been truly committed to the database.

I'm getting at what may be a conflict between the MSEG getting created in an Update Task and the point in time when the BADI is called.

If the BADI is called before MSEG gets committed that would cause a problem, though probably and OBJECT_NOT_FOUND exception.

First I would start the workflow using SWUS. If that works, then...

I would try triggering the ItemCreated event manually using SWUE, for the instance of MSEG that you got your most recent error. You know for certain that the instance was created earlier (just no wf started). If SWUE starts the WF, then the BADI call is suspect. If you still get the same error then its something else.

The Workflow Template itself is active from what you mentioned before correct? I would go back to the template, generate a new version, then activate it, and examine all the messages that come from activating it, looking for something suspicious

I would also create a new shell of a workflow (maybe a simple container operation step at most), with the same Event Linkage to ItemCreated and see if it starts.

I would also try deleting the binding between the Event Container and Workflow Container temporarily and retry just to see if the WF will start. Sure the flow will error without a leading object, but at least it would have started.

Keep me posted...

former_member214498
Contributor
0 Kudos

Hi Thomas

Thanks for a very informative answer. It helped me to think in a new direction that is about BADI and update task. However I later diagnosed the problem. before telling you the solution, let me tell you that everything was generated and active.

it was a issue with a container element. Actually I had created a container element called MSEG. Tht element was set as IMPORT and EXPORT. I just removed export from the attributes of the above mentioned elements. Reactivated the binding and it was working great afterwards. Now the workflow receives this event from BADI and process it as per the the requirement.

Thanks & Regards

Waz

Former Member
0 Kudos

Hi Waz,

I'm happy to learn that you solved the problem. That's what's most important. Just when you think you've seen it all . . .

Former Member
0 Kudos

Presuming this is occurring in your Development system, I would first check to see if the workflow template itself is activated. I don't know how many times I've forgotten to activate a template after making a change to it, and then immediately testing with it.

Worse, I've made a quick change to a template in Dev and would then Transport it to QA without activating it (I know, I should have tested in Dev first). My template in QA would be inactive so I would have to go back to Dev, activate (and test), and retransport.

Another incident which caused a workflow template to not activate in QA (even when active in Dev), was when an HR Org Management Object was set to be the Administrator or Responsible, but the Org Management Object didn't exist in QA.

As for the Event Linkage, deactivating, this is due to a setting on the event linkage itself for your template. I'm old school and don't have a system in front of me at the moment, but I would use transaction SWETYPV, Event Type Linkage (similar if not the same as SWE2). Find your Event/Template combination and change the parameter (can' remember the name of it) that has to do with event errors. The "Default" setting deactivates the linkage, so you need to change it to "Do Nothing" or something to that effect.

Hope this is releven...Apologies if not...

Tom Carruth

former_member214498
Contributor
0 Kudos

Hi

Thanks for penning down such a detailed reply. Every thing is activated and checked which includes workflow, event and the badi that generates that event(ItemCreated).

I have also changed the setting in event linkage which now does not deactivate the workflow but still throwing the same error 'Workflow 91100019 cannot be activated'.

Regards

Waz