Automatically complete pending interactive activities within a process

What is the best approach for automatically completing pending interactive activities within a process?
Scenario: If you have two or more threads within a split-join and one thread completes all the defined activities whilst the other thread is still waiting for an interactive step to be completed, is there a programmatic way of completing outstanding tasks i.e remove them from the workspace task list and move then onto the next task
At the moment we have just configured the join activity to only wait for one process to complete but I was wondering if there was a way using the java api.
Thanks in advance

What I think you're asking is how to complete activities in the split so the instance can go onto the next activity after the join. If so then use just use
Action = RELEASE;
in the join. You'll need to surround this statement with appropriate conditional statements since the code in the join runs each time an instance copy (from one of the branches) reaches the join. You'll need to test to see if the instance is ready to proceed then do the action=release.
If this is not what you want then you may need to involve something more complex, like placing a Notification Interrupt in your process. By interrupting the interactive in a split/join, you can perform these activities from within the interrupt process flow:
OK / NONE      Indicates that PBL-Method execution was successful. This is the default value.
FAIL                Indicates that the PBL-Method has failed its execution. The PBL-Method must be executed again, if it is so required.
CANCEL           PBL-Method execution is aborted.
REPEAT           Indicates that the PBL-Method execution is successful, but not recorded as completed.
RELEASE           Ends the PBL-Method execution and releases the instance from this activity.
ABORT           Ends PBL-Method execution and aborts the entire process instance.
BACK           Ends PBL-Method execution and sends the instance back to the activity where the exception (or interruption) occurred.
SKIP                Ends PBL-Method execution and sends the instance back to the activity where the exception (or interruption) occurred and skips it.
Note the last one allows you to skip the interactive upon return and go to the next activity. Sorry I can't help any further. You may want to describe you're problem some more and perhaps we can help you better.
Mark

Similar Messages

  • CRM CICO - Automatically complete follow on activities

    Hi all,
    In tcode CIC0 to automatically complete the activities I am trying to use BAPI BAPI_ACTIVITYCRM_CHANGEMULTI. I am forwarding the whole program too. Can anyone please tell me why the progrm si not working ?
    REPORT  z_crmorderread.
    DATA : lt_header_guid TYPE crmt_object_guid_tab,
           wa_header_guid TYPE crmt_object_guid,
           wac TYPE  crmt_object_guid,
           lt_doc_flow TYPE crmt_doc_flow_wrkt,
           wa_doc_flow TYPE crmt_doc_flow_wrk,
           lt_status TYPE crmt_status_wrkt,
           lt_save TYPE TABLE OF bapibus20001_guid_dis,
           wa_save TYPE bapibus20001_guid_dis,
           h_header TYPE TABLE OF bapibus2000110_header_ins,
           wah_header TYPE bapibus2000110_header_ins, " work area
           hx_header TYPE TABLE OF bapibus2000110_header_insx,
           wahx_header TYPE bapibus2000110_header_insx, " work area
           s_status TYPE TABLE OF bapibus20001_status_ins,
           was_status TYPE bapibus20001_status_ins, " work area
           lt_input_fields type table of BAPIBUS20001_INPUT_FIELDS,
           wa_input_fields type  BAPIBUS20001_INPUT_FIELDS,
           sx_status TYPE TABLE OF bapibus20001_status_insx,
           wasx_status TYPE bapibus20001_status_insx. " work area
    DATA : return TYPE TABLE OF bapiret2,
           vc_log_handle TYPE balloghndl, " log_handle
           saved_objects TYPE TABLE OF bapibus20001_object_id,
           return2 TYPE TABLE OF bapiret2.
    *---- Here I am hardcoding the GUID of the complaint.
    wa_header_guid = '44401B7FCBF1016C00000000888DE646'.
    APPEND wa_header_guid TO lt_header_guid.
    CALL FUNCTION 'CRM_ORDER_READ'
    EXPORTING
        it_header_guid                = lt_header_guid
    IMPORTING
        et_status                     = lt_status
        et_doc_flow                   = lt_doc_flow
      CHANGING
        cv_log_handle                 = vc_log_handle
         EXCEPTIONS
           DOCUMENT_NOT_FOUND            = 1
           ERROR_OCCURRED                = 2
           DOCUMENT_LOCKED               = 3
           NO_CHANGE_AUTHORITY           = 4
           NO_DISPLAY_AUTHORITY          = 5
           NO_CHANGE_ALLOWED             = 6
           OTHERS                        = 7
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    READ TABLE lt_doc_flow INTO wa_doc_flow INDEX 1.
    wah_header-guid = wa_doc_flow-objkey_b.
    wa_input_fields-REF_GUID = wa_doc_flow-objkey_b.
    append wa_input_fields to lt_input_fields.
    was_status-ref_guid = wa_doc_flow-objkey_b.
    wac = wa_doc_flow-objkey_a.
    wa_save-guid = wa_doc_flow-objkey_b.
    APPEND wah_header TO h_header.
    wahx_header-guid = 'X'.
    APPEND wahx_header TO hx_header.
    was_status-status = 'E0005'.
    APPEND was_status TO s_status.
    wasx_status-ref_guid = 'X'.
    wasx_status-status = 'X'.
    APPEND wasx_status TO sx_status.
    CALL FUNCTION 'BAPI_ACTIVITYCRM_CHANGEMULTI'
    TABLES
       header              = h_header
       headerx             = hx_header
       status              = s_status
       statusx             = sx_status
      input_fields        = lt_input_fields
       return              = return.
    APPEND wa_save TO lt_save.
    **commit work.
    CALL FUNCTION 'BAPI_ACTIVITYCRM_SAVE'
                    EXPORTING
                      UPDATE_TASK_LOCAL       = 'X'  "update_task_local
                      SAVE_FRAME_LOG          = 'X'  "save_frame_log
    IMPORTING
       log_handle              = vc_log_handle
    TABLES
       objects_to_save         = lt_save
       saved_objects           = saved_objects
       return                  = return2.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
        wait = 'X'.
    COMMIT WORK.
    break-point.
    The contents of both return tables are :
                                                             Return :
    W   |CRM_ORDER           |004   |Referenced object type (STATUS) not allowed
    S   |CRM_MESSAGES        |006   |Start of processing 'Individual receipt'
    Return2
    E   |CRM_ORDER           |037   |The document could not be saved
    Regards and thanks in advance,
    Varun.

    Hi
    You should set a break-point in function module crm_order_maintain and manually close a follow on.  By doing this you will see exactly what values you need to pass to the function module.  You will also see that this function module will get fired a few times, depending on what processing you do to the follow up.
    Here is the code I use for closing an interaction record, I hope it helps...
      DATA:
      ls_input_field   TYPE crmt_input_field,
      lt_input_field   TYPE crmt_input_field_tab,
      ls_input_names   TYPE crmt_input_field_names,
      lt_input_names   TYPE crmt_input_field_names_tab,
      lt_orderadm_h      TYPE crmt_orderadm_h_wrkt,
      ls_orderadm_h      TYPE crmt_orderadm_h_wrk,
      et_status TYPE crmt_status_comt,
      es_status TYPE crmt_status_com,
      wa_status type crmt_status_wrk.
          es_status-ref_guid       =  iv_guid.
              es_status-ref_kind       = 'A'.
              es_status-status         = 'E0003'.
              if ls_orderadm_h-process_type = 'Z001'.
                es_status-user_stat_proc = 'ZINTREC'.
              else.
                es_status-user_stat_proc = 'ZCALLIST'.
              endif.
              es_status-activate       = 'X'.
              append es_status to et_status.
              ls_input_field-REF_GUID    = iv_guid.
              ls_input_field-REF_KIND    = 'A'.
              ls_input_field-OBJECTNAME  = 'STATUS'.
              if ls_orderadm_h-process_type = 'Z001'.
                ls_input_field-LOGICAL_KEY = 'E0003ZINTREC'.
              else.
                ls_input_field-LOGICAL_KEY = 'E0003ZCALLIST'.
              endif.
              clear ls_input_names.
              ls_input_names-FIELDNAME = 'ACTIVATE'.
              append ls_input_names to gt_field_names.
              ls_input_field-field_names = gt_field_names[].
              append ls_input_field to lt_input_field.
              CALL FUNCTION 'CRM_ORDER_MAINTAIN'
                EXPORTING
                  it_status         = et_status
                CHANGING
                  ct_orderadm_h     = it_orderadm_h
                  ct_input_fields   = lt_input_field
                EXCEPTIONS
                  error_occurred    = 1
                  document_locked   = 2
                  no_change_allowed = 3
                  no_authority      = 4
                  OTHERS            = 5.
        CALL FUNCTION 'CRM_ORDER_MAINTAIN'
                EXPORTING
                  it_status         = et_status
                CHANGING
                  ct_orderadm_h     = it_orderadm_h
                  ct_input_fields   = lt_input_field
                EXCEPTIONS
                  error_occurred    = 1
                  document_locked   = 2
                  no_change_allowed = 3
                  no_authority      = 4
                  OTHERS            = 5.
    CALL FUNCTION 'BAPI_ACTIVITYCRM_SAVE'
      TABLES
      objects_to_save = lt_save
      saved_objects = saved_objects
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
      wait = 'X'.
      COMMIT WORK.

  • Can the PBL scripts be used to complete human interaction step of a process

    Hi,
    I wish to have two threads between a split-join.
    On thread has external notification-wait and other has a human interaction step.
    The idea is just to show in a person's inbox a pending human activity(but should not actually work on it using workspace). Some other X application sends an 'external notification' to this process(notification-wait activity) saying that this human step is complete. Then the notification-wait activity will change the status of the process in other flow that human step is completed by a participant 'XYZ'.
    You may suggest that instead of having split and join have an external human task which will then be completed by external application. But it is like.., currently the project demands that at times completing human task may not be so real time. A person completes task in an external app and say after 1 day that human step is to go ahead. in BAM DB and Process Data mart DB this human step is to be marked complete so that meaningful dashboards can be created.
    So to say in other words is it possible to write some
    pbl-scripts with some papi code which can update the process that human interaction step is complete?
    Also is it possible for an admin user to complete a human task but actually updating the process db in such a way that some other participant has actually worked on it.?
    Please, Can you hook me up the right PAPI classes which can help me out with this?
    Thanks & Regards,
    Govinda

    This list is more complete and was updated on 02/20/2011. <br />
    http://www.mvps.org/dmcritchie/firefox/keyboard.htm
    It has the new keyboard 4.0 command for Panorama, but I didn't verify that list is as complete as I know the keyboard shortcuts - but a quick glance looks like it is.

  • BPM 11g - Making comments visible to all interactive activities in process

    Does anyone know of a way to make comments from one interactive activity visible in a subsequent interactive activity within the same process?
    We need this visibility since there are multiple human tasks in the process and the comments are relevant to the instance as a whole as it travels through the process.
    I've attempted to create a process data object of type "TaskExecutionData" and use that to map the comments in and out of the data associations for the interactive activities, but ran into bpel faults. The first attempt just used simple data association mappings for the execData.userComment collection (array) - but that results in assignment errors at runtime if there are no comments present. Having seen these errors before and having resolved them using a XSL transformation, I tried that route as well to map the userComment collection using a for-each construct - however that attempt resulted in a different bpel fault at runtime referring to duplicate definitions of the same type or something to that effect.
    Any ideas?

    Yes, but this is in version 11g, not 10g or 6. The human tasks use the ADF task flows, as is standard practice in 11g.
    I've attempted mapping the userComment array from the task's execData to process variables, but that effort resulted in bpel faults at runtime.
    I managed a roundabout way (i.e. a hack) to get the comments into the new task from the previous one using the human workflow services API in a managed bean of the task flow, but I'm having difficulty getting the comment iterator of the data control to update and pull in the comments.

  • How to automatic complete workflow after 3 weeks ago ?

    Hi all,
    I have one problem about workflow in SAP.
    I have the workflow that have one agent to assigned.
    How can I setup workflow to automatic complete if agent don't process task within 3 weeks ?

    Hi,
    Check whether the background job SWWDHEX is configured and its running for each 3 minutes.
    Also if you set the deadline as 3 minutes's, then you have to wait for some more 3 mins. Once the deadline reached the background job will execute the step with in three minutes. Check transaction SWWA. Here you can set the time interval for deadline job SWWDHEX.
    Then in the Activity step once the deadline is set, then select the modeled deadline in the action field. So that it will create a new
    branch in the wok flow template.
    For testing purpose, Just create a send mail step in the new branch and wait for ten minutes. Deadline will be reached and the mail will send to the inbox.
    Thanks.

  • OnEntry onExit functionality for Interactive Activities

    Does anyone know how to set onEntry and onExit kind of functionality for interactive activities in ALBPM 5.7
    It is easy to add automatic activities before and after interactivity to do same job but then it starts cluterring the process if we have too many interactive activities.
    What I want to do is do the time calculations based on instance.receptionTime (time when instance arrives in interactive activity). I cannot get this time accurately by adding automatic activity before interactive activity.
    Is there any way to specify tasks in interactive activity and get them automatically executed on arrival of instance and leaving of instance?
    I haven't used optional tasks before. I dont want to make extra calls from Client which is implemented using PAPI.
    Please advise.
    Thanks,
    Anil

    I am not familiar with the products you speak of. There is Adobe Captivate (available separately and part of the eLearning Suite) that can be used to make interactive products. There is Director which is a bit more complex. There used to be a great Macromedia product that languished under Adobe call Authorware which was easy to use and still available, but alas hasn't been updated for use with modern systems in ages. You might get more help posting in the Adobe eLearning forum.
    http://forums.adobe.com/community/elearning

  • Automatic creating a Interaction record in the WebClient

    Please help!  I need a way to automatically create a Interaction Record in the Web Client from a file.  Is anybody know how to do this.  I need to extract data from another system like R/3 and automatically load this into the interaction record, but I don't which ways to approach.

    Hello,
    In a SAP standard scenario an interaction record is always created. You can however control this behaviour in the "Business Transaction profile" which is linked to the "main IC web profile". In that business transaction profile you need to define a "leading" business transaction. This leading bus. trans. is the transaction that is created the moment a business partner is confirmed.
    To automatically fill this "leading" bus. trans. (an interaction record in your case) you have multiple options, you can code this directly in the webclient BSP pages (eg by subscribing to the "bp confirmed" event and then fill the interaction record that is created) or in the overall system by working with events on bus. obj. To control what is initially filled there is no standard process foreseen in this flow.
    Hope this helps,
    Kind regards,
    Joost
    Edited by: Joost Stallaert on Jan 19, 2009 11:25 AM

  • Program is not sending emails if I run it within the process chain

    Hi All,
    I am facing a weird issue; I have an ABAP program which compares tables and sends the results in an email. It is working fine if I run it standalone. However, if I run it within the process chain it still runs but doesn't send the email.
    Any idea on how to troubleshoot this?
    Thanks

    maybe because it's ran under a different user (ALEREMOTE)?
    the user that executes the "mail" needs a valid emailaddress to be able to send...

  • Interactive Forms within an Acrobat Portfolio--- why not??

    Hi,
    I have a student asking why she isn't able to save a group of interactive forms within an Acrobat Portfolio, and have the Tracker recognize the responses to the form. Sounds as if this shouldn't be a problem. But...
    I've tried it myself, and it appears that when working from within a Portfolio, I have no access to the "Distribute Form" command. Is this correct or is it a bug?
    If I skip the Distribute Form option and instead upload the Portfolio to Acrobat.com, I *am* able to fill out the form and hit "submit". It *does* submit a reply to my email address, in the typical .fdf format. When I go to my email address I can download the .fdf file to my local machine, but after that the system seems to break down.
    TheTracker has no clue that any response has occurred.And when I try to "compile returned forms", the .fdf  files are not recognized: I cannot import the response.
    Is it because there was no "Distribute Form", that the Tracker doesn't recognize responses?
    It would seem like the most useful thing to be able to send a variety of forms to new employees in the Portfolio format. Can it be done? And how?
    Thanks! I hope someone can help, or at least clarify. The student will be back tomorrow and I'd love to have a reply for her.

    Hi "critter_monster" It is by design that the distribute options is not available for files that are in a Portfolio. You can only distribute forms that are not attached to a portfolio. Since tracker only tracks forms distributed the the distribution workflow, it is expected that it would not recognize the .fdf from the submit button.
    Adobe does have a "wish list" form that you can submit feature requests through. You can always submit a request for that functionality. The form is here: https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform&promoid=EWQQL

  • HT204406 Itunes Match won't upload. I get error stating there was an error in the itunes store, please try again. I have tried again everyday for the last month and am still unable to use.  Any ideas on why Match can't complete the 1st step of the process

    Itunes Match won't upload. I get error stating there was an error in the itunes store, please try again. I have tried again everyday for the last month and am still unable to use.  Any ideas on why Match can't complete the 1st step of the process (Gathering information about your Itunes library)?

    JohnCullison wrote:
    For the last few weeks, the iTunes store has been displayed with empty graphic rectangles (with a blue box containing a white question mark centered in the rectangles), bits of text, and some buttons. The page extends quite a ways, including what I assume would be all the links to all the music...
    If all you are trying to do is buy music, you can easily buy MP3s at any online music download store (e.g. amazon.com) and add them to your iTunes library.

  • Automatically complete a word template using the oracle database

    I have a Microsoft office word template and I would like to automatically complete some fields using data from my Oracle 10g database. For example where I have the text “Dear Mr.” I want to get the name of that person from a table in the database. Also by pressing a button in Oracle forms I want to open the word document to see the result. Any ideas how to do that? Thank you.
    Message was edited by:
    Flomaster

    Hello,
    There are lot of code pertaining to your requirement(OLE) in forms forum,a search will give you the required code.
    Regards
    Mohan

  • How to call Interactive form within Workflow ?

    Hi,
    I have created a interactive form within WebDynpro for ABAP which triggers a workflow for approval. Now I would like to open the same interactive form by the approver and approve the request.
    Any input for calling interactive form from Workflow would be helpful.
    Regards
    Ravikumar

    u need to create the events step by step in the workflow.
    first event would be the condition which should be checked so that it gets triggered when the condition is satisfied.
    second would be the the triggering in which u will get this triggered. u need to create a class in which the adobe form's code will be present like the FM it generates etc.in this class u will to write some methods for eg: if u create method say send_mail in this class u will code all the logic for sending the adobe form as a mail and u assign this in the workflow. So now, in the workflow all the methods that u assign will get triggered.

  • Automatically display the Interactive Scripting on WinClient's CIC

    Is it possible to automatically display the Interactive Scripting for the cic Agent?
    I only have one script so there's really no need for the agent to choose when he only has that option.
    I'm on CRM 4.
    Thanks in advance,
    V

    Hi Vitor,
    To show the Interactive Scripting ViewSet as the default Viewset for your IC profile you will need to do the following customizing step:
    IMG > CRM > IC WebClient > Define Inital ViewSets and Transactions
    Create a new entry for your profile and set the Initial View to ScriptViewSet
    The views for Interactiver Scripting itself (in CRM4) are JSP's located in the Java Stack of the CRM server and can not be maintained using the ABAP workbench, so if you want to launch a script by default you will need to "extend" the coding of the appropriate JSP

  • Call a web service in an interactive form within SAP

    hi experts
    I need to call a Web service into an interactive form within SAP, but to do so fails to press on the button that calls the Web service, the strange thing is that if I keep the PDF in my PC, then open that PDF download button works correctly if I am doing something wrong?, you can do what I need?.
    Greetings.

    Hi asdasdasdasd1,
    not sure if I fully understand your problem but it sounds like you are trying to execute your Web Service in the preview tab of LiveCycle Designer. When you do this, features of the Reader Extension Rights are not available so you will have to generate the form via the ADS and test the WS on the generated rendition as you have done.
    Let me now if this helps.
    Regards,
    Ben.

  • Read an Attachment attached within a process instance

    Hi
    I am using BPM 11.1.1.6, can someone tell me how do I read and parse an attachment attached within a process instance. Thank you.
    Regards
    Venkat

    Thank Sudipto for the link.
    Experts,
    I used the API as suggested in the first link and managed to iterate through the attachments attached in a process instance but when i am trying to read the attachments using the getInputStream() its returning null, all the other properties of the taskattachment returns correct information. Is this a known bug?? The sample code snippet is as below:
    List attach= task.getAttachment();
    int i=0;
    for (Object obj :attach){
    i=i+1;
    AttachmentType taskAttachment = (AttachmentType)obj;
    System.out.println("Task Attachment " + i + " " + taskAttachment.getName());
    System.out.println(taskAttachment.getMimeType());
    System.out.println(taskAttachment.getSize());
    InputStream inpStream= taskAttachment.getInputStream();
    if (inpStream == null){
    System.out.println("Stream is empty");
    }

Maybe you are looking for