Programatically pprove/Disapprove user decision step in a waiting workflow.

Hi Experts,
If I have the approval step work item ID,can I programetically resume the waiting workflow by providing the input (approve disapprove).
The use case is that the workflow is started. The workflow has a approval step and it is now waiting for user decision.
When the workitem is created,I get the workitem id thru an exit.
Now assume the user decision is got thru another means and now I want to resume the waiting workflow by providing the decison into the waiting workflow.The workflow should now continue with the subsequent steps.
Is there any WAPI to do that.
Thanks in advance.
Bikram

Ad Hoc Approval should be done with transaction SWIA.
If this occurs a lot then a redesign of the flow is in order. One where with deadline monitoring you can take certain actions when workitems are idle for an amount of time.
Also setting up substitution is advisavle for this scenario.
Programmatically doing stuff is done with the SAP_WAPI function modules, check out if sap_wapi_decision_complete works for you.
Kind regards, Rob Dielemans

Similar Messages

  • User Decision step in UWL

    Hi,
    I have a 3 user decision steps in my Customised workflow which uses the task TS00008267. Each task has different decison text and outcome. When this is executed through UWl the outcome does not appear as they are in SBWP.
    Does this need and Portal Configuration?
    Thanks & Regards

    Hi,
    There are two thing you need to do.
    First, you need to configure the SWFVISU.
    Run Tcode SWFVISU.
    here, select "Task Visualization' and maintain your standard task ( TS ) with ABAP web dynpro option.
    Now selct your entry and click on Visualization Parameters as mentopn below.
    APPLICATION ( WD application name )
    DYNPARAM
    NAMESPACE
    SYSTEM_ALIAS
    Second, ask Portal team to chagne the XML code for the above standard task and application ( i.e. WD appilcation which will be launced on clicking the task ).
    From the next run of the workflow, WD applcitoon will be lauched from the protal.
    for the old workitem this will not work.
    Note : If u do not configure SWFVISU then WD application will not lauch but user will get SAP gui screen for processing it.
    xlm code must be changed corresponding task for both case.
    Thanks and ragards,
    SNJY

  • Adobe form as attachment to user decision step

    Hi,
    i need to add adobe form as attachement to user decision step in workflow.
    1. i created activity step which call business object method with parameters workitem id
         i am using FM  SAP_WAPI_ATTACHMENT_ADD’  which will return attribute id
         i am passing that attribute with document id to 'ZSOFM'
            ZSOFM <-----------------------------------ZSOFM (Method to task)
          Bindings 'Attach_objects'  <------------- ZSOFM(Task to Workflow).
    2. i created user decision step
        Bindings  'Attach_objects' --------------------> 'Attach_Objects'( Workflow to user decision task).
    but when we execute first activity step in background i am not getting any PDF output .but when we  execute same method from class i can see pdf data is coming is it due to user name WF-Batch.
    when i execute activity step in back ground which will have sy-uname as WF-Batch i am not getting any PDF output data.
    please help how to solve .
    Thanks,
    Phani

    In transaction SWO1 create a z-object lets say zmyobjpdf (you might want to use it as a sub object of your standard object without delegation since they will probably have the same key).
    create a method in that object calling the adobe form.
    set it as the default method in the object header.
    now create an instance of the zmyobjpdf in the workflow for example as an attribute of the original object) and transfer it to the decision task.
    It will be displayed as an attached object pressing it will call the default method - your adobe form.
    If your question was about how to create a function module to display the form see SAP Library - PDF-Based Forms

  • Can we display custom error message in user decision step screen.

    Hi,
    My requirement is to display error message when approver selects reject button in user decision step.
    based on some condition i need to display error message in user decision screen when approver tries to
    reject .
    Please help
    Thanks,
    Phani

    Hi ibrahim,
    Thanks for your Replay.
    steps
    1. cretae global class with interface  IF_SWF_IFS_WORKITEM_EXIT.
    2. cretae Event with importing parameter.
    where i need to call EVENT_RAISED method ,do inned to call that method in
    IF_SWF_IFS_WORKITEM_EXIT ?
    how  SWRCO_EVENT_AFTER_EXECUTION value is passed to method EVENT_RAISED ?
    Thanks,
    phani

  • Container variables in User decision Step in BPM

    Hello,
    I am using User decision Step in BPM.
    When i use only text in "Title for Display" the BPM is activated successfully and Status in SXI_CACHE also shows 0.
    If I use container variables in "Title for Display" the BPM is activated successfully but status in SXI_CACHE shows 99.
    It shows the below error
    "Problem updating an integration process with object ID 073AF2C620F43E839B2903344DEE29BB. Symbol 'CE/KO' expected at position 1 in expression ''
    Please suggest.
    Thanks,
    Shabari

    Hi Shabari, did you follow the steps for declaration of variables as in [SAP help for user decisions|http://help.sap.com/saphelp_nwpi71/helpdata/en/42/c2a19fb4511d65e10000000a1553f6/content.htm]? How did you define your variable?
    Maybe discussion [in this thread|BPM activation Error in SXI_cache; can help, it is unanswered though.
    Regards, Martin

  • Link in User Decision step not showing correctly in UWL

    Hi SAP Experts,
    I have a requirement to add a link in a user decision step, this link triggers a custom webdynpro for additional input. When I access the workitem from Business Workplace, the link is showing fine. But when I execute the workitem in UWL, the link is not displayed, instead the code is shown (<a>...</a>). Please advise on what I should do to have the link working. Thanks in advance.

    Hi,
    This same thing was just recently discussed. I just cannot find the thread anymore (well, in that thread there was not really any solution). Basically the hyperlinks in work item do not seem to work in UWL as they should. I don't know if there are any way to make them work. My suggestion is to not use the hyperlink at all and replace that with an action (=button) to the task in the UWL. This can be achieve quite easily by simple XML configuration in portal. If you have worked with UWL this should be quite straightforward for you, or if there is a consultant at the site, who is familiar with UWL, this should be simple for him/her.
    Regards,
    Karri

  • SOFM in user decision step - provide reason in UWL

    Hello Everyone,
    I'm working with a customer who wants to use a user decision step and add a reason for the rejection only.  This step will be executed in UWL - since UWL doesn't support syncrhonous dialog chains, it can't be implemented by adding another step with SOFM.  I have seen the 'template with attachment' in the user decision step, and have tried binding SOFM to the Reference in the container, but the user doesn't have the option.
    Perhaps this could be implemented with a secondard amodal method - which checks the user decision code and only implements if the decision was rejected.  I'd like to be able to put a condition on the secondary methods.
    If you've done something like this, please let me know!
    Regards
    Ginger

    Hi Ginger,
    Unfortunately it is not only synchronous dialog chains, but also secondary methods that are not supported in the UWL, so you're stuck both ways.
    Though, I have been told that the latest SP does support some kind of advance with dialog functionality (SP15 I think?).
    At one customer we used a custom ABAP-based decision step which executed in a wingui session - thus synchronous dialog chains worked as long as every subsequent step was wingui based (which SOFM.CREATE obviously is) - worked quite well.
    Let me know if you need more info.
    Cheers,
    Mike

  • Looping a single branch in User Decision Step

    Hi All,
    Can anyone tell me is looping possible for a single branch in user decision step in a workflow?
    If yes, How?
    I want like to loop the step cancel and keep workitem inbox.
    Whenever the user clicks cancel and keep workitem in inbox in a user decision and again executes the WI i would like the workflow to start execution from the step just above the user decision step, i.e; Display PR.
    This is my requirement. Tell me how can i implement it?
    Thanks,
    Raj

    Hi,
    instead of doing so, you could try to enter that method as "secondary method" or "before method" within the tab-strip "Methods".
    If you used your own coding for a decision, you could enable the exception 8015 of the method's result, which is the cancel-button. If you did so, you can enable that outcome in the workflow-activity's definition.
    Best wishes,
    Florin

  • User Decision Step in BPM - PI 7.1

    Hi All,
    I have posted a wiki for User Decision step in BPM in PI 7.1, Please go through it and post your queries, suggestions and comments here.
    The link for same is under:
    Part1 - https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/userDecisionstepinSAPPI7.1-Part+I
    Part2 - https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/userDecisionstepinSAPPI7.1-Part+II
    Regards,
    Sachin

    Hi Sachin,
    Nice job,
    During my practice on this scenario. I have got an error please kindly guide me on this, may this error also clear for the others
    *I got an error on SXI_MONITOR as:*
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIAdapter</SAP:Category>
      <SAP:Code area="BPE_ADAPTER">UNKNOWN_MESSAGE</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:Stack>No object type found for the message. Check that the corresponding process is activated</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    The trace of the error as:
    <Trace level="1" type="B" name="CL_XMS_PLSRV_CALL_BPE-ENTER_PLSRV">
      <Trace level="1" type="T">could not create BPE proxy for message, no XML object definition found for message 72485F6BFC78416A29EEE3EE10D09BCE</Trace>
      </Trace>
      </Trace>
      <Trace level="1" type="System_Error">Error exception return from pipeline processing!</Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST" />
    Please kindly guide me on this, Is the message has to validate at sender agreement? if not where is the error I am doing?

  • User Decision step- Upon reject, auto-popup text for reason

    In a user decision step, when the user clicks the reject button, open text for rejection reason within the workitem.
    i have done the following
    1) Create a new step
    2) Create a task based on SOFM.CREATE
    3) Binded  WIOBJECT_ID => (append table) ADHOCOBJECTS
    It works fine, when the user clicks the reject button a new work item with the reason for rejection lands in the user inbox, which when clicked brings up the doc.
    I want to make it seamless for the user where as soon as the reject button is clicked, the document <b>should open right away</b> without a new work item in the inbox
    Any help will be greatly appreciated

    Hi
    If you are using the portal/UWL then search the blogs for a solution otherwise give this a try, in your step definition for the 2 steps, go to the Details tab and tick 'Advance with dialog', this will work if you execute from the business workplace.
    Good Luck!
    Ravi

  • Need 2 Multiline elements for user decision step

    We are on SAP R/3 Enterprise version.
    I have this requirement to find agents based on the agent type and work center field.  So I created a responsibility rule for each type of agent type.  The responsibility rule is keyed on the work center, and HR positions are mapped to each responsibility rule’s work center field. 
    We have 50 agent types/responsibility rules, 60 work centers, and 1 or more positions for each agent type and work center combinations. Due to the total number of positions, I prefer to use 1 responsibility rule per agent type for ease of maintenance.
    I have a FM that reads the responsibility rule based on the agent type and work center field and retrieve the agent_list.  I used this FM/method/step prior to my user decision step and pass the agent_list to the UD step via container.
    In my user decision step, the ‘Other’ tab does not have Multiline element for me to enter my agent_list.  So I cannot use &agent_list[&_WF_PARFOREACH_INDEX&]& in my user decision agent assignment expression field.
    In my last job, we have SAP ECC 5.0, the UD step has a ‘Misc’ tab that has Multiline element, but our current SAP R/3 Enterprise version does not have ‘Misc’ tab, it only has ‘Other’ tab.
    Question:
    1.  How do I use [&_WF_PARFOREACH_INDEX&] without Multiline element for agent_list in UD step?
    2. I have to use the same way to retrieve my LED_agent_list as well, so I need 2 Multiline elements in my UD step. But normally in  ‘Other’ tab, it allows you to define only 1 Multiline element. How do I get around this restriction?
    3. My last resort is to use 1 responsibility rule, then I can use the rule in the agent assignment.  If that is the case, is there any limit on the number of entries in the rule?
    Thanks.
    Amy

    Sorry, I posted to the wrong forum.

  • Need Help on User decision step in BPM

    Hi All,
    I have a requirement to design the user to to system interaction in a partiular scenario.  I am trying to use the User decision step in BPM available in PI 7.1 server. I have used the User decision step and filled all the parametes as given in the sap documentation. When I am trying to execute the scenario, The outbound process is succesful but stops at the BPM workflow at the User decision step with the message (No Agent ready) .
    Can anybody help me in solving this issue.
    Thanks in advance,
    Kalpana

    Hi Shabarish and Swarup,
    I have defined the relevant user in  the Integration directory , also made sure that the user entered is defined on the integration server and there are not restrictions on the defined user. The workflow log is as follows:
    Workflow              File2File_BPM1
    Workflow instance     File2File_BPM1 http://File2File_BPMdemo
    Instance number       000000001046
    Start date            30.12.2008     Started by            WF-BATCH
    Start time            11:33:36       Current status        In Process
    View: Workflow chronicle
    Error       St Task                                          Result                                   Date       Time     Processing time
    Error Agent                     Executed Action                          Date       Time     Object               Object Name                    Object 2             Object name 2                  User Context
    File2File_BPM1 http://File2File_BPMdemo       Workflow started                         30.12.2008 11:33:36               -1s
    WF-BATCH                  Start message received                   30.12.2008 11:33:36 MIAB_BPM_OB2 / http: C532A7AB4D284B9011C0B0C7F8AFB                                                      WF-BATCH
    WF-BATCH                  Workflow started                         30.12.2008 11:33:36                                                                                WF-BATCH
    WF-BATCH                  Events Dispatcher Active                 30.12.2008 11:45:36 MIAB_BPM_OB2 / http: 597B946347C148AD03988B5D8BE2C                                                      WF-BATCH
    WF-BATCH                  Events Dispatcher Active                 30.12.2008 11:45:37 MIAB_BPM_OB1 / http: 6E0E09EE977E4F333D02DDDAE9A52                                                      WF-BATCH
    WF-BATCH                  Events Dispatcher Active                 30.12.2008 13:48:07 MIAB_BPM_OB2 / http: 9F5491FD9BC642E50486A6FED89DA                                                      WF-BATCH
    WF-BATCH                  Events Dispatcher Active                 30.12.2008 13:48:07 MIAB_BPM_OB1 / http: 1AE5BB06D72341AD01F8C45E6AA7E                                                      WF-BATCH
    WF-BATCH                  Events Dispatcher Active                 02.01.2009 05:34:58 MIAB_BPM_OB2 / http: CD698CDE5606436811BAB330011AF                                                      WF-BATCH
    WF-BATCH                  Events Dispatcher Active                 02.01.2009 05:34:59 MIAB_BPM_OB1 / http: 2D82C00C16E0447F1DF3B133470AD                                                      WF-BATCH
    'Good'{TYPE=SWFXST_STRING}'BAD'{TYPE=SWFXST                                           30.12.2008 11:33:37                0s         1046
    WF-BATCH                  Dialog work item created                 30.12.2008 11:33:37                                                                                WF-BATCH
    WF-BATCH                    EVALUATE_AGENT_VIA_EXPESSION           30.12.2008 11:33:37                                                                                WF-BATCH
    I hope this can help you in identifying the error.
    Thank you,
    Kalpana

  • User Decision step in BPM

    Hi,
    I have requirement.PI is reading data from source and after transformation sending one mail to approver .If Approver approves it then messgae will be sent to target system.For approval and rejection ,I am using user decision step in BPM.
    My question is if approver approves reqest in 15 days ,then what will happen in SXMB_MONI,Will the message got failed?

    PI should not be used for such scenarios.
    The User Decision step in BPM is merely thought for PI admins, if a message should retried or skipped. Not for end-users.
    Create a Wokflow in ECC or similar.

  • Error Handling in workitem---user decision step

    HI Experts,
    I have created work item through user decision step. In that decision i have given Approve & Reject Option
    now when user click on Approve that i need to do some validation based on this i need to give error also at same time i dont want to complete that workflow...i want that after getting error user must recity that error and than come back again to inbox and execute that workitem... I tried it but i am not able to do this...can anybody pls provide the hint for this requirement.
    Thanks & Regards,
    Taran

    Hi Pavan,
    I am confused i your third point.
    . In the Approved branch of the Decision step check for the condition , if it fails then raise the exception.that you have define in the Point 1. in the exception branch insert the logic so that the condition becomes true, after that step insert one more decision step.
    how i 'll raise the raise the exception do i need to create and task or any other step.
    also can you please explain below point in detail.
    in the exception branch insert the logic so that the condition becomes true, after that step insert one more decision step.
    also i am working into SAP CRM 2007 web UI environment.
    Please advice.
    Thanks,
    Taran

  • Attachment in WORKFLOW user decision step

    Hi all,
    My requirement is to display a link in user decision step.
    When link is clicked, control should navigate to MM02 transaction.
    Also in following user decision step i need to provide link for smart form in user decision.
    Can anybody please guide in detail .
    Thanks.
    Edited by: Sanjay_lnt on Sep 26, 2010 1:14 PM
    Edited by: Sanjay_lnt on Sep 26, 2010 1:15 PM

    Closed.

Maybe you are looking for

  • Cannot connect to specific Cube through BI Semantic Model for Power View in SharePoint 2013

    I'm trying to create a connection to an Analysis Services Cube through a BI Semantic Model connection in SharePoint 2013 to create a Power View report. I'm able to connect to other cubes on the same server, and I have SQL Server 2012 SP1 Update 9 ins

  • Socket lost data

    We have a socket connection and when reading a huge XML file, part of it is lost. No exceptions are thrown. only a few lines in the middle of the xml is lost. We use InputStream in = socket.getInputStream(); BufferedReader dis = new BufferedReader(ne

  • Utl_file errors

    create or replace procedure load_student (pdir varchar2, pfile varchar2) is vfile utl_file.file_type; vtext varchar2(200); vname varchar2(20); vcourse varchar2(20); vfee number(5); fcomma number(3); scomma number(3); begin vfile := utl_file.fopen(pdi

  • Not Authorized to tranfer music.

    I recently took my computer in. I had to reinstall the itunes program, then downloaded the new version. Everything went well. But now I cannot transfer purchased music and certain other songs into my Ipod. It says that I am not authorized on this com

  • In-house production with on-line publication and external procurement C5

    Dear SAP Gurus, I need to configure PPDS to immediate transfer in-house production orders but to have periodical transfer for external procurement, do you know how to do this? Thanks and BR Andre