Advance With Dialog on Asynchronous Task

Bratzler, Loren Loren.Bratzler at nscorp.com
Mon Jun 29 15:18:46 EDT 2015


I'm not sure how I am going to be able to tell from within the EDIT method if the document is "COMPLETE" or not.  The method code is executing transaction MIR4 directly like this:

  begin_method edit changing container.

  DATA: xwfla1 LIKE boole-boole VALUE 'X'.                  "Note916729
  SET PARAMETER ID 'RBN' FIELD object-key-invoicedocnumber.
  SET PARAMETER ID 'GJR' FIELD object-key-fiscalyear.
  SET PARAMETER ID 'CHG' FIELD 'X'.
  EXPORT xwfla1 TO MEMORY ID 'FIENJOYWF'.                   "Note916729
  CALL TRANSACTION 'MIR4' AND SKIP FIRST SCREEN.

  end_method.

Loren


From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of Ramki Maley
Sent: Thursday, June 25, 2015 6:02 PM
To: SAP Workflow Users' Group
Subject: [EXTERNAL] Re: Advance With Dialog on Asynchronous Task

Loren,

Instead of a terminating event for your custom EDIT method, Try issuing an EXIT_CANCELLED if the document is not 'COMPLETE'. This will keep the workitem from completing.

Cheers,
Ramki.
On 6/25/15, 1:58 PM, Bratzler, Loren wrote:
Hello Wuggers,

Hope someone can help me here:

I have a requirement in a workflow to have a two-part approval process for the Incoming Invoice (BUS2081) business object.  The first part of the approval process is to have the approver open the document in Edit mode and review and make revisions to a restricted number of fields.  Once their review is done, we want them to click "Save as Complete" and then automatically advance to the second part of the approval process where the user decision (approve or reject buttons) appear.

For the first step of the process, I am using the standard EDIT method of the object and when I define my task for using this method, I assign the terminating event "COMPLETED" so that the task will only complete when the user clicks "Save as Complete".

The problem is that the EDIT method for this object is asynchronous:

[cid:image001.png at 01D0B27E.E3D7F9B0]

So the "advance with dialog" option does not work to automatically advance to the user decision step where the approve/reject buttons will appear.

I tried to create my own custom synchronous method in the object that was a copy of the standard method.  I then created a new task to execute this new method and defined the same terminating event.  However, the problem with that is when I insert the task into the workflow, there are two outcome paths.  One path is for the terminating event I assigned but the other path is the normal "advance" path.  This causes the workflow to advance to the user decision step when we don't want it to.  We only want it to advance when they click "save as complete" and raise the COMPLETED event.  With this configuration, the step advances when they click other options on the screen like "back", "exit" or "cancel".

[cid:image002.png at 01D0B27E.E3D7F9B0]

The workflow builder will not allow me to deactivate the "Step executed" outcome for the step:

[cid:image003.png at 01D0B27E.E3D7F9B0]

Error message that occurs when you try to deactivate this outcome:

[cid:image004.png at 01D0B27E.E3D7F9B0]

So I'm trying to figure out is there some way for me to get around these limitations?

Loren Bratzler
Norfolk Southern Corporation




_______________________________________________

SAP-WUG mailing list

SAP-WUG at mit.edu<mailto:SAP-WUG at mit.edu>

http://mailman.mit.edu/mailman/listinfo/sap-wug

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20150629/62cd8ff0/attachment-0001.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 16930 bytes
Desc: image001.png
Url : http://mailman.mit.edu/pipermail/sap-wug/attachments/20150629/62cd8ff0/attachment-0004.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 12739 bytes
Desc: image002.png
Url : http://mailman.mit.edu/pipermail/sap-wug/attachments/20150629/62cd8ff0/attachment-0005.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 18717 bytes
Desc: image003.png
Url : http://mailman.mit.edu/pipermail/sap-wug/attachments/20150629/62cd8ff0/attachment-0006.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 22027 bytes
Desc: image004.png
Url : http://mailman.mit.edu/pipermail/sap-wug/attachments/20150629/62cd8ff0/attachment-0007.png


More information about the SAP-WUG mailing list