Skip to Content
author's profile photo Former Member
Former Member

Need to trigger a workflow for single time

Hi,

I have developed a workflow for Work Order that has three triggering events(Created, Changed, StatusChanged).

Whenever A work order has been created or changed or status has been changed the workflow will be triggered.

The Workflow basically call a program that takes work order number as input an create corresponding iDoc.

My problem is that when a user changed data and status of a work order at same time and hit save button two workflows has been triggered. One for changed event another for statuschanged event. For this, two duplicate iDocs have been generated.

And this need to be stopped. Is there any way to to stop creating duplicate iDocs by triggering the workflow for single time for this particular case?

Please help.

Regards,

Manas

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 22, 2011 at 03:22 PM

    Hi,

    I guess you should use check function modules in your event for this ... In your FM check if there is already an instance of your BO event in system if yes the check condition should fail...

    Also add some time gap in the function module so that the earlier events is triggerred and workflow instance is created for the same...

    Or

    IN your workflow include a step to check if there is already an instance of the same workflow.. you can you a process control to delete logically delete the work item and complete the workflow...

    Regards

    Gautam

    Edited by: gautam maini on Aug 22, 2011 5:26 PM

    Add a comment
    10|10000 characters needed characters exceeded

    • Hello,

      Thanks for the detailed explanation.

      1. User opens a work order for change(IW32) then changes its status and data both and hit save button.

      2. User opens a work order for change(IW32) then changes its status only hit save button then again he opens the same order and changes its data only and hit save button within 5 seconds.

      Why oh why would you want to differentiate between these two scenarios? What difference does it make to the business process? I'm not sure you can even differentiate between them. You could look in the change tables (CDHDR etc) and see if there's a difference and then build that into the logic. But again, why should these two scenarios be treated differently?

      regards

      Rick Bakker

      hanabi technology

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.