Skip to Content
avatar image
Former Member

Material Workflow with terminating events


Hi ,

I have created new custom workflow for material master and business object is BUS1001006.

Workflow functionality is that when user changes MRP fields WF should trigger and it will go to Approvals once we get all the required approval we are applying the MRP changes to MAterial. Here Approval step is using custom screen, so we are completing approval step using terminating events.

Issue is that let say, user has changesd the ABC material with plant 4012, now WF triggers and when user again chnages the ABC Material with plant 4013 another WF triggered. Now when First WF approved, the other ther WF is also getting approved. becasue in terminating events we are receiving a business object of type BUS1001006 in this only material is key field.

Can you please suggest, how should I proceed and we are using this workflow from last 2 years, just now we have identified this issue.

Regards,

Santosh.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jan 09, 2015 at 07:00 AM

    Hi,

    In your situation BUS1001006 is not and has never been sufficient - just like you have now learned. You should have used another business object or created a new one that has a "more accurate" key including the plant.


    How to fix the situation:

    Doing some bigger changes to the business object is most likely out of question. First of all I would take a closer look to the code that triggers the events. Could you for example add a new parameter "plant" to the event? This way the workflow would get the information about for which plant the event was triggered, and you could do some additional checks (compare the plants) in the workflow whether the workflow can end or not. The task/work item gets completed, but at least you could direct a new one back to the agent with a loop.

    Whatever you do, be very careful about what the changes will do for the existing workflow instances (the ones that are already running). If you do some bigger changes to the task, you must understand that the tasks don't have versions, and if the changed task is somehow incompatible with the existing solution, you might run into big problems.

    Regards,

    Karri

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Bakker,

      Thanks for your repply.

      In my case we have only one plant, if I create plant as attribute, can we have unique key while binding between terminating event asd task.

      Regards,

      Santosh.

  • avatar image
    Former Member
    Jan 19, 2015 at 11:09 AM

    Hi ,

    Please let me know, I can do in this way for the issue..

    Here, can I change business object method from asychronous to synchronous and I will capture user decissions("Approve", "Reject"  ) from function module export parameters. ?

    Regards,

    Santosh.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      I have no idea what you are doing now (is this even related to the original question?).

      In general you don't change business object methods (or any standard objects) - you should create a new method. There is a standard procedure how to add additional functionality (attributes, methods etc.) to standard business object.

      Regards,

      Karri