cancel
Showing results for 
Search instead for 
Did you mean: 

Need to execute a workflow as a new instance.

ramiwal_dsilva
Participant
0 Kudos

Hi Everyone,

Being a novice in workflows , I need your help with the following scenario.

I need to re-instantiate a workflow as a new instance only because the current instance says that the WF status is still "In progress", checking in detail I see that some work items have been logically deleted, I don't know how.. but it seems to have happened when someone was trying to manually complete it.

However I do not know how the workflow is triggered or if at all there is a an underlying business object that triggers it.

When I checked under SWDD>>basic data......... I do not see a start condition maintained in the workflow.

I also checked swe2 for an event linkage ... I do not see an entry maintained.

Can someone explain what does this imply? Is there a way to check the business object that triggers this workflow? or is it maintained somewhere?

Thank you

Accepted Solutions (1)

Accepted Solutions (1)

anjan_paul
Active Contributor
0 Kudos

Hi,

  Then check, is the  workflow directly  triggered usin fm SAP_WAPI_START_WORKFLOW

sbl
Active Contributor
0 Kudos

Hi,

Basically you can start a workflow via an event (preferred way) or directly via a function module (or several)

So first check your former instance to see if the workflow had been triggered via an event

If this is the case, then check the setting of the event linkage in SWETYPV or SWE2

if the linkage is inactive it can be cause by the default system setting that is set as deactivate if there is an error => this shall be changed

so you would need to reactivate the event linkage

Cheers

Stephane

ramiwal_dsilva
Participant
0 Kudos

Thanks Stephan, I managed to get this resolved.

Firstly, I logically deleted the old instance by marking the first step as Logically deleted.

But later I was stuck because I realized that the wf did not have a start event maintained neither did it have any linkage with SWETYPV or SWE2.

To be honest, I was clueless about  what the workflow was doing , neither did i know the business event that triggered it.

But as i was looking into the instance that was logically deleted, I found the Business object name that triggered it. I saw it inside the container instance of one of the old work items. under _wi_object_id.

I used this Business object name  to trigger a new instance Via transaction code : SWUS.

A new instance is now triggered.

You made a very good point with "So first check your former instance to see if the workflow had been triggered via an event"

That was the only way I could trace it to the event

Thanks for all your help.

Jocelyn_Dart
Product and Topic Expert
Product and Topic Expert
0 Kudos

Btw next time you might want to try the event log transactions SWELS (to activate the log) and SWEL to view the log. That's an easy way to see whether there are any events happening and if they are being impacted by start conditions, check functions or other problems

Jocelyn_Dart
Product and Topic Expert
Product and Topic Expert
0 Kudos

Also the workflow log itself shows how the workflow instance was started and by whom - not a full view but at least it tells you if it was started by an event or started directly, and whether it was started by a real user or a batch user.

ramiwal_dsilva
Participant
0 Kudos

Thank you Jocelyn!

Answers (0)