Skip to Content
May 30, 2014 at 08:51 AM

Background task is not being executed


Hi all,

It's been some time since I've played with workflows and I have forgotten quite a lot, so I assume that this is a simple matter and I'm just forgetting something.

Background: In response to changes that are being made to one of objects in system I'm trying to an update z-tables. I've decided to use workflow events that are being fired during creation of change document.

What I did:

- I've created ABAP class that implements IF_WORKFLOW interface and implemented all Methods (especially BI_PERSISTENT~FIND_BY_LPOR and BI_PERSISTENT~LPOR, rest have only EXIT inside), added Contructor, event and my own method that do all work.

- I've prepared Workflow that was started with event that I've declared in my class and added one activity that is calling method (that do all work)

- I made all customizing that was necessary for this to run (like in transaction SWEC). Since this is SAP object and change object already exists, I did no changes in SWED

- for first test I've set it task work in dialog and added me as an agent


I'm changing an object. In effect in SWIA workflow is getting status STARTED and automatically a dialog step is added with status READY. I can execute it in business workplace. Dialog step is being set to COMPLETED, but workflow has still status STARTED - I've to click button "manualy end" in SWIA to make it change into COMPLETED. What could be the reason?


I've deleted agent for my task and I've set it to "background task"


I'm changing an object. In effect in SWIA workflow is getting status READY. No background task is being created automatically, why? When I click "execute workitem" and refresh then workflow status is STARTED and background task is being created, however It's not being executed, again why? When I go in details of this task then I can see that its start date/time and creation date/time are equal, so it should be executed right after creation.

Any ideas are welcome

Best Regards

Marcin Cholewczuk