Passing values to workflow

Hello all,
I've a report program, the output of whch is an internal table with a single field type c. (elementary internal table). I've schedule the program to run at a specific time in background. Now, whenever the program executes, I want a workflow to trigger and pass the entire internal table to the workflow. How do I achieve this? Please help me out.
Regards
Indu.

hi,
here is an example
CONSTANTS : gc_task LIKE swwwihead-wi_rh_task VALUE 'WS99900152'.
DATA : BEGIN OF it_swcont OCCURS 0.
        INCLUDE STRUCTURE swcont.
DATA : END OF it_swcont.
MOVE : 'MATERIALRESERVATION'  TO  it_swcont-element,
             090          TO  it_swcont-elemlength,
             'o'        TO  it_swcont-type.
      CONCATENATE sy-sysid 'CLNT' sy-mandt
      'BUS2093' 'XXX'  gd_rsnum INTO
              it_swcont-value.
      REPLACE 'XXX' WITH '   ' INTO it_swcont-value.
      APPEND it_swcont. CLEAR it_swcont.
      MOVE : '_WF_INITIATOR'  TO  it_swcont-element,
             014          TO  it_swcont-elemlength,
             'C'          TO  it_swcont-type,
             gd_creator   TO  it_swcont-value.
      APPEND it_swcont. CLEAR it_swcont.
*-------get work item type
      CALL FUNCTION 'RH_GET_WORKITEM_TYPE'
           EXPORTING
                task_object = gc_task
           IMPORTING
                wi_type     = gd_type.
*----start workflow ---------------------
      CALL FUNCTION 'SWW_WI_START'
           EXPORTING
                creator       = gd_creator
                task          = gc_task
                workitem_type = gd_type
           IMPORTING
                wi_id         = gd_id
           TABLES
                wi_container  = it_swcont.

Similar Messages

  • Re: Help needed in passing values from workflow to Approve Forms

    Dear Experts,
    how do I pass values from a workflow to a step (Form) - approve form?
    I am using a customized table structure as my data source (FORMCONTAINERELEMENT) but am stuck on how to access the data when i get to to the screen painter's flow logic... What am i missing? Can you give me a step by step example. the ones i see on the net are input fields that update the screen... nothing that shows value being passed from the outside.
    I need to pass an exisitng value in the workflow into the form for approval of the the assigned agent.
    Please help!!
    Thank you.

    Hello !
             Create a method just before the form step.This method should populate the values for the fields maintained in the form.
             Pass the values populated from this method to your customized table structure (data source).In other words, you have to pass all the values to the workflow container.
            To the step, pass this workflow container by binding.In the control tab of form step, you have to do the binding.
    Regards,
    S.Suresh

  • How to pass values one by one from Multiline container in workflows

    Hi,
    I have used a structure in my workflow as multiline container.
    I want to pass values 1 by 1 to the workflow but not all the three values..so how do i pass the values 1 by 1 rather all at a time..
    kindly suggest me
    Thanks,
    Shanky

    Hi,
    Create a new container with type I and set the initial value as 1.  EX : Index.
    Pass your Multi-line container and this index container to a new method. Get the multi line container data's into an internal table
    and read the data based on the index and append the data's to a new multiline container.
    Second time increment the index container by 1. So now the value of index container will be 2.
    Pass the multiline container value and index to method. now it will read the second record from the internal table.
    Call the method using the loop step type.
    Thanks,
    Viji.

  • Passing value from event to workflow container

    Hi experts,
    I have triggered a workflow using SAP_WAPI_CREATE_EVENT fm. I have declared 3 parameters in the BO for the event. Similarly i have created the 3 parameters in workflow container to receive the values.When the user clicks a button i trigger the workflow using the fm. I have to pass values of these 3 parameters to 3 parameters of the workflow container. Can you please tell me how should i pass the value from event to workflow container. Is there any way i can set workflow container parameter values while calling the fm itself.

    INPUT_CONTAINER     LIKE     SWR_CONT     Input container (name-value pairs)
    The above tables parameter is used to transfer the values from FM to workflow.
    declare a internal table of type SWR_CONT
    DATA:
    lt_cont TYPE STANDARD TABLE OF swr_cont,
    ls_cont TYPE swr_cont.
    ls_cont-element = 'ELEMENT NAME 1'.
    ls_cont-value = <Variable which holds the value>
    APPEND ls_cont TO lt_cont.
    ls_cont-element = 'ELEMENT NAME 2'.
    ls_cont-value = <Variable  which holds the value>
    APPEND ls_cont TO lt_cont.
    ls_cont-element = 'ELEMENT NAME 3'.
    ls_cont-value = <Variable  which holds the value>
    APPEND ls_cont TO lt_cont.
    pass lt_cont to the parameter INPUT_CONTAINER

  • How to pass value standard program to Workflow after than to call Transaction

    Hi Experts..
        While We are Cancel any PO in Me29n, it will Pass values(Like reason for cancel With PO No) and Send a mail (User name whose reject the cancel against Release of PO No) in workflow inbox(workplace) After than getting a mail any particular User, they will See the Message of  Purchase  order against  Canceled. After then they will double click on that message it will trigger ME29N Tcode with the particular PO.
            Using with Badi in Me29N we have to Passed  Values and sent a Mail in work place but When  Double click on Message I Dont Know HOw to Call ME29N in work place....
         Cancel Po in Me29N-->WORK PLACE --> Double click on message,will call ME29N
       So, please help me how to i can Rectified this.
    Regards,
    kumar

    hi Kumar
    BUS2012 is a business object, see it in tcode SWO1.
    You can try blow code:
    INCLUDE <CNTN01>.
    DATA: OBJ TYPE SWC_OBJECT.
    DATA: PO_ITEMS TYPE TABLE OF BAPIEKPOC.
    DATA: PURCHASEORDER     TYPE     BAPIEKKO-PO_NUMBER VALUE '4500000004'.
    SWC_CONTAINER CONTAINER.
    SWC_CREATE_OBJECT OBJ 'BUS2012' ''.
    SWC_CREATE_CONTAINER CONTAINER.
    SWC_SET_ELEMENT CONTAINER 'NotificationType' 'S1'.
    SWC_SET_ELEMENT CONTAINER 'PurchaseOrder' PURCHASEORDER.
    SWC_CALL_METHOD OBJ 'Display' CONTAINER.  " call method 'Display' show ME29N.
    Infact, you can achieve all your requirment in workflow, don`t need implement BADI.
    The trigger event is event 'rejection_start' in BUS2012. Create a user decision(which will show in workplace) and create a task bounding the 'Display' method of BUS2012.
    There are so many detail content in scn or wiki. thanks.
    hope can help you.
    Regards,
    Archer

  • Pass values between two workflow steps.

    Hi,
    I have requirement to pass values from one workflow step to another workflow step .
    1. In workflow step 1 , we have created dynamic user group.
    2. I need to get user group name in another workflow step.
    Thanks
    Ravindra

    First of all if you want to pass custom property to next step then you have to customize the current and next step (if you can it as process step). As of now i can think of one approach by setting up value in meatdata of next route as below in your execute method (if there is only one next step not with "and" or "or" condition otherwise you have to use id or name to find out next step).
    first step
    List<Route> routes = session.getRoutes(item)
    Route route=routes.get(0);
    route.getDestinations().get(0).getMetaDataMap().put("key", value)
    session.complete(item,route);
    destination step
    MetaDataMap map=item.getWorkflowData().getMetaDataMap();
    map.get("key");
    You can try once to check if it works else check through session. Let me know if it doesnt' work for you.

  • How to pass Z values to workflow.

    Hi all,
    I would like to pass values of a Z table to step of workflow, specifically to condition step. I need to pass the entries values defined in Z table to compare material group of REQREQ to them.
    Is possible it?
    is there another solution to do it?
    Many Thanks.
    Regards,
    David.

    Hi David,
    I am not sure what your exact requirement is, but to access the Ztable you can follow this approach. Create an Activity task in workflow and make a call to a BO method. In this method query the Ztable to fetch the values to be used in the workflow. Pass these values in the export parameter of the BO method.
    Access the parameter in a multiline workflow container element and then use it in the workflow where ever desired.
    Hope this helps!
    Regards,
    Saumya

  • Passing values from and to workflow container

    Hi Guys,
                 I am reading and writing back into the workflow container element from task container using FM.
    But its not writing back the values into workflow container.
    here is my code.
    swc_get_element container 'TripNumber' trip_no.   
    Fetch Personal No. from Trip No.                
      SELECT SINGLE pernr FROM ptrv_head INTO l_pernr  
        WHERE reinr = trip_no.                                                                               
    IF sy-subrc NE 0.                                 
      EXIT.                                            
    ENDIF.                                                                               
    Fetch Employee Name                             
    SELECT SINGLE ename FROM  pa0001 INTO l_ename      
           WHERE  pernr = l_pernr                      
           AND    endda  >= sy-datum                   
           AND    begda  <= sy-datum.                  
    Fetch Employee Email id                         
    select single usrid_long from pa0105 into l_email 
       where pernr = l_pernr                           
         and usrty = '0010'                            
         and endda  >= sy-datum                        
         AND begda  <= sy-datum.                       
    Set Personal No.                          
    swc_set_element container 'Pernr1' l_pernr. 
    Employee Name                             
    swc_set_element container 'Ename' l_ename.  
    Email ID                                  
    swc_set_element container 'Email' l_email   
    Am I missing anything here.
    Thanks

    Hi,
    I faced the same issue and i found that it is not sufficient to just have proper bindings and using macros with exact container names.
    You need to create IMPORT and EXPORT parameters for that METHOD with names matching with container element names. Once you do this, you see a GREEN binding icon right below the BO and Method name in the TASK. Click that icon and create binding between TASK and METHOD.
    This should resolve your problem.
    All - Please correct me if am wrong as i am new to the workflow.
    Thanks,
    SKJ

  • Passing values between adf application and web services

    hi i have a situation where i have jsff page which got username,surname,lastname,email i what to pass this value to my webservices how can i do that. this is how i create my webservicesright click viewControler->web services->web services Data Control
    i what to pass the value to webservices workflow i already have a screen in my workflow now i what to pass the adf application values to that webservices am in jdeveloper 11.1.1.6.0
    i try this
    <af:inputText simple="true"
                            required="#{bindings.Username.hints.mandatory}"
                            columns="#{bindings.Username.hints.displayWidth}"
                            maximumLength="#{bindings.Username.hints.precision}"
                            shortDesc="#{bindings.Username.hints.tooltip}" id="it1"
                            value="#{bindings.Username.inputValue}">
                <f:validator binding="#{bindings.Username.validator}"/>
                <af:setPropertyListener from="#{bindings.Username.inputValue}"
                                        to="#{bindings.start_user_details}"
                                        type="action"/>
              </af:inputText>

    i make my webservices to pass values
    <af:inputText simple="true"
                            required="#{bindings.Username.hints.mandatory}"
                            columns="#{bindings.Username.hints.displayWidth}"
                            maximumLength="#{bindings.Username.hints.precision}"
                            shortDesc="#{bindings.Username.hints.tooltip}" id="it1"
                            value="#{bindings.Username.inputValue}">
                <f:validator binding="#{bindings.Username.validator}"/>
                <af:setPropertyListener from="#{bindings.Username.inputValue}"
                                        to="#{bindings.approveUser_username}"
                                        type="action"/>
              </af:inputText>
    but am geting error reference approveUser_username not found

  • How to get values from workflow to program

    Hello everybody,
    I am stuck with an issue in workflow. I want to know how can I get the values of workflow in Abap program.
    Scenario:
    The workflow is triggered when a user does the transaction MIGO.
    The user gets a workflow in his SAP inbox. He clicks on the link and is able to view details in MIGO.
    I want to get the material number and year in program ( as shown below)
    I am new to workflow, is there any kind of binding to do? And maybe a method or function module which will allow to get these values in program.
    Thanks a lot
    Regards

    Hello,
    With some help here and there, we have been able to set up the workflow. Special thanks to Modak Gupta.
    I'm sharing the steps below. I would be grateful if someone could explain the different binding, what are their purposes depending on the place they are done, etc. I am still not very at ease with the binding. Thanks.
    Requirement:
    Once MIGO is done, the client wishes to do another MIGO. For him to know that the first MIGO has been done, he needs to get it in his SAP Inbox (Workflow). From there, he can just execute the workflow and he will do the second MIGO.
    Steps:
    1. Create a BAPI in SE37 to get the purchase order (we need it because we will open the second MIGO with the purchase order of the first MIGO). We will also call the transaction MIGO in the BAPI (For our requirement, it is ZMIGO, but very similar to MIGO, just some different customizing).
    In the BAPI, use the function module BAPI_GOODSMVT_GETDETAIL to get the purchase order.
    A BDC is also done in the BAPI to open ZMIGO with the purchase order.
    Code:
    FUNCTION zbapi_call_transaction.
    *"*"Interface locale :
    *"  IMPORTING
    *"     VALUE(MATERIALDOCUMENT) TYPE  MBLNR
    *"     VALUE(MATDOCUMENTYEAR) TYPE  MJAHR
    *"  EXPORTING
    *"     VALUE(RETURN) TYPE  BAPIRETURN
    DATA: gt_items TYPE STANDARD TABLE OF bapi2017_gm_item_show,
    gs_items TYPE bapi2017_gm_item_show,
    gt_return TYPE STANDARD TABLE OF bapiret2,
    gs_header TYPE bapi2017_gm_head_02,
    l_materialdocument  TYPE  bapi2017_gm_head_02-mat_doc,
    l_matdocumentyear TYPE  bapi2017_gm_head_02-doc_year.
    DATA: gs_bdcdata  TYPE bdcdata,
    gt_bdcdata  TYPE TABLE OF bdcdata,
    l_opt TYPE ctu_params.
    l_materialdocument       = materialdocument.
    l_matdocumentyear        = matdocumentyear.
    CALL FUNCTION 'BAPI_GOODSMVT_GETDETAIL'
    EXPORTING
    materialdocument = l_materialdocument
    matdocumentyear  = l_matdocumentyear
    IMPORTING
    goodsmvt_header  = gs_header
    TABLES
    goodsmvt_items   = gt_items
    return           = gt_return.
    READ TABLE gt_items INTO gs_items INDEX 1.
    IF sy-subrc EQ 0.
    CLEAR gs_bdcdata.
    gs_bdcdata-program  = 'SAPLMIGO'.
    gs_bdcdata-dynpro   = '0001'.
    gs_bdcdata-dynbegin = 'X'.
    APPEND gs_bdcdata TO gt_bdcdata.
    CLEAR gs_bdcdata.
    gs_bdcdata-fnam = 'BDC_CURSOR'.
    gs_bdcdata-fval = 'GODYNPRO-PO_NUMBER'.
    APPEND gs_bdcdata TO gt_bdcdata.
    CLEAR gs_bdcdata.
    gs_bdcdata-fnam = 'GODYNPRO-PO_NUMBER'.
    gs_bdcdata-fval = gs_items-po_number.
    APPEND gs_bdcdata TO gt_bdcdata.
    CLEAR gs_bdcdata.
    gs_bdcdata-fnam = 'BDC_CURSOR'.
    gs_bdcdata-fval = 'GODEFAULT_TV-BWART'.
    APPEND gs_bdcdata TO gt_bdcdata.
    CLEAR gs_bdcdata.
    gs_bdcdata-fnam = 'GODEFAULT_TV-BWART'.
    gs_bdcdata-fval = '101'.
    APPEND gs_bdcdata TO gt_bdcdata.
    CLEAR gs_bdcdata.
    gs_bdcdata-fnam = 'BDC_CURSOR'.
    gs_bdcdata-fval = 'GODYNPRO-PO_NUMBER'.
    APPEND gs_bdcdata TO gt_bdcdata.
    CLEAR gs_bdcdata.
    gs_bdcdata-fnam = 'BDC_OKCODE'.
    gs_bdcdata-fval = '=OK_GO'.
    APPEND gs_bdcdata TO gt_bdcdata.
    l_opt-dismode = 'E'.
    l_opt-defsize = 'X'.
    CALL TRANSACTION 'ZMIGO' USING gt_bdcdata OPTIONS FROM l_opt.
    ENDIF.
    ENDFUNCTION.
    2. Create a Business Object in SWO1.
    It is a copy of BUS2017, we have added our BAPI and an event. We also modified the program.
    Modify the program by clicking on Program above:
    Add the parameters in the new method (BAPI)
    Add the parameters in the new Event.
    3. Implement the BADI in SE18 / SE19
    BADI: MB_DOCUMENT_BADI -
    Method: MB_DOCUMENT_BEFORE_UPDATE
    Get the purchase order
    Use the function module SAP_WAPI_CREATE_EVENT to pass values from program to workflow.
    Code:
    method IF_EX_MB_DOCUMENT_BADI~MB_DOCUMENT_BEFORE_UPDATE.
    DATA : BEGIN OF key,
    mblnr TYPE mkpf-mblnr,
    mjahr TYPE mkpf-mjahr,
    END OF key.
    DATA : event_container TYPE TABLE OF swcont.
    DATA : objkey TYPE sweinstcou-objkey.
    DATA : s_xmkpf TYPE mkpf.
    DATA: l_RETURN_CODE TYPE sy-subrc,
    l_event_id TYPE SWR_STRUCT-EVENT_ID,
    lt_container TYPE STANDARD TABLE OF SWR_CONT,
    ls_container TYPE SWR_CONT.
    data :INPUT_CONTAINE type table of SWR_CONT ,
    x_cont type swr_cont.
    " numéro commande d'achat
    DATA ls_xmseg TYPE mseg.
    CLEAR ls_xmseg.
    READ TABLE xmseg INTO ls_xmseg INDEX 1.
    x_cont-ELEMENT = 'MATERIALDOCUMENT'.
    x_cont-VALUE = ls_xmseg-mblnr.
    APPEND x_cont to INPUT_CONTAINE.
    x_cont-ELEMENT = 'MATERIALDOCYEAR'.
    x_cont-VALUE = ls_xmseg-mjahr.
    APPEND x_cont to INPUT_CONTAINE.
    CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
    EXPORTING
    object_type             = 'ZYBI'
    object_key              = objkey
    event                   = 'EVENT2'
    COMMIT_WORK             = space
    IMPORTING
    RETURN_CODE             = l_RETURN_CODE
    EVENT_ID                = l_event_id
    TABLES
    INPUT_CONTAINER         = INPUT_CONTAINE.
    endmethod.
    4. Create the workflow in SWDD
    Add the Business Object in the container and tick Import.
    Create a task with the following details.
    Click on Binding in the above screen:
    Create an Activity and attach the task to it.
    Affect Agents
    Add a starting event in Basic Data.
    Add a Process Control to end the workflow.
    Workflow Final should look like this:
    I hope it would be helpful to some of you. Sorry about the binding, there might be some issues not correct. But normally, if you follow the steps as they are, and for binding, you do Automatic Binding, it should be ok.
    Thanks

  • Passing values to ABAP/JAVA  webdynpro appl. when workitem invoked from UWL

    Hai,
    We are using universal worklist for invoking a workitem. The workitme may trigger a ABAP/Java based webdynpro application. I have registered the tasks associated with the workitem in universal worklist.
    I have few doubts in the integration part,
    1. When a workitem is clicked in UWL, I want to get some values from the workflow container and show it on the webdynpro application. In the webdynpro application I can call a function module to get the values from workflow container by passing in workitem id.How can I pass a workitem id to webdynpro application when a workitme is clicked.
    2. After the user open the workitem a webdynpro application is shown on the screen. Lets assume this screen is having "Approve", "Reject" and "Exit" button. When this button is clicked how to pass that information to workflow so that the workflow flow its paths.
    Please let me know how to do this.
    Thanks & Regards,
    H..K.Hayath Basha.

    Hai Chintan,
    I checked the blog, and found the below code,
    workflowrawdata =
        wd_context->get_child_node(
              'WORKFLOWRAWDATA' ).
      CALL METHOD
                  WORKFLOWRAWDATA->GET_ATTRIBUTE
             EXPORTING
                     NAME   = 'WI_ID'
             IMPORTING
                      VALUE  = wi_id.     
    I have the following doubts in the code,
    1. Where I have to put this code,
    2. Using which data element or type I have to declare, "workflowrawdata".
    3. Should I have to declare "WI_ID" in parameter tab of Webdynpro application.
    4. In webdynpro application what I did is,
    a. In the context of component controller, i have created attributes to store workflow id, and some attributes to store the value from workflow container.
    b. I created a view and in view context i have created attributes to store workflow id, and some attributes to store the value from workflow container.
    c. I created some UI elements in the view and binded that UI elements with view context.
    d. I binded view context with the context of component controller.
    e. I created a window and in the view context i have created attributes to store workflow id, and some attributes to store the value from workflow container.
    f. I did context mapping between window context and component controller context.
    g. I added the view to the window.
    h. I created a inbound plug with name "START". This creates a method called "HANDLESTART" to this method I added a importing parameter named "WI_ID" and added the below code,
    data : lo_node               type ref to IF_WD_CONTEXT_NODE,
           l_cont                 type standard table of swr_cont,
           l_cont_line            type swr_cont,
           rc                     type sy-subrc,
           l_wi_id                type sww_wiid,
           l_object               type SWOTOBJID,
           lv_workitem_attributes type swr_wihdr.
    call method wd_context->get_child_node
         exporting
           name = 'WORKFLOWRAWDATA'
         RECEIVING
           child_node = lo_node.
    lo_node->set_attribute( value = wi_id name = 'WI_ID' ).
    l_wi_id = wi_id.
    Please let me know what else i have to do to get the workflow id in ABAP-Webdynpro application.
    Regards,
    H.K.Hayath Basha.
    i.

  • Passing data to workflow container declared as sturcture

    Hi all,
    I am working on SAP workflow(4.6C version) and has decalred a container element (Invoiceheaderdata) as IMPORT with datatype reference as ABAP Dictionary and Referance table as <zstructure>.
    Now when i run the workflow for tesing from workflow definition itself i get selection screen for input data with the container element.
    But when i try to enter my data for the structure it gives an error message "PLEASE ENTER THE VALUE FOR ELEMENT USING INPUT HELP".
    Please some one let me know how to pass values to a container element <sturcture type>
    I had successfully run this workflow in 4.7 so please answer only for 4.6C verison but not keeping in mind the 4.7
    any inputs in this regard are appriciated
    Thanks in advance
    Lakshmi Narayana.S

    hi nayak,
    i tried even that option when i try to use F4 help it raises a message saying "input not supported for structured elements of data type structure".
    So in this case what should i do?
    even if you know somebody who worked on 4.6C version pls let me know. I'll give full points
    Thanks
    Lakshmi

  • Passing Values to a dropdown list within a dialog box

    I am using the app.execDialog(dialog1) command to display a dialog box on my form. The dialog box contains dropdown list (popup). I have found examples that do this but in all the examples they reference the loadDefaults function with hardcoded values.
    For example:
    loadDefaults: function (dialog)
    dialog.load(
    subl:
    "Acrobat Standard": "111",
    "Adobe Reader": "222"
    Does anyone know if there is a way to pass values into the loadDefaults via a variable etc.. I can get the data I want to populate the dropdown with but I cant figure out how to load it into the control.
    Thanks
    Ken

    Hi scamp, not sure what you're asking. What do you mean by "pass" fields from one list to another? If you need information in list 1 to show in list 2, just create lookup columns in the SharePoint list. If you mean you want to add columns to
    list 2 automatically, you'll need to make a designer workflow for that.
    cameron rautmann

  • Default method - how to pass value to method container?

    Hello,
    I am dealing with a hyperlink in 'Objects and Attachements' section of the workitem.When i click on the link, the default method of the business object gets called automatically.
    My question is: How to pass values to the default method (i.e. method container) as i don't invoke the method in my workflow explicitly?  The method gets called when we click on the hyperlink.
    Regards,
    Monica.

    Hello Monica,
    a default method doesn't require parameters (and cannot make use of them), as they are designed to be called from various situation, such as the view from a workflow container, the display button within a workitem or the attachment list. So this is part of the system design.
    To make an object dependent of workitem values I usually follow two different design patterns:
    <b>1) Using a flowitem/workitem instance with a special default method</b>
    - Create a subobject from type WORKITEM (if I'm going to use values from the current workflow instance) or subobject from type WORKINGWI (if I'm going to use values from the current dialog workitem).
    - Do not make a general substitution for this new object type
    - If using a ZWORKITEM, create an instance of this object type before the dialog step and then pass this object to the dialog workitem
    - If using ZWORKINGWI, assign the object instance during the data flow to the step.
    - In the properties of the object choose (any one) default method
    - Within the coding you have the reference to the workitem/flowitem as object-key-... and you can further use functions/methods to read the workitem/flowitem container and do whatever has to be done
    <b>2) Retrieving values from the current workitem on-the-fly</b>
    Within the coding of the default method call the function module SWO_QUERY_REQUESTER that returns the instance/id of the current workitem-in-work (with is also set when using the hyperlink from a workitem). If the list is empty, there's no active workitem, otherwise use functions/methods to read the workitem container.
    --> edit: Solution is not release safe, is it aint working with SAP R/3 Enterprise and higher
    Best regards,
       Florin
    Message was edited by:
            Florin Wach

  • Deferred Tasks - Passing Variables into Workflow

    Hi everyone
    I am experiencing difficulties with deferred tasks in IDM 8.1. I have managed to create a deferred task on a user, with the task name being ‘Generate Email’. I also passed in an attribute ‘id’, and these can be seen in the user view under waveset.properties.tasks.
      <Activity id='1' name='Add Deferred Task'>
                    <Action id='1' application='com.waveset.session.WorkflowServices'>
                        <Argument name='op' value='addDeferredTask'/>
                        <Argument name='type' value='User'/>
                        <Argument name='name'>
                            <ref>accountId</ref>
                        </Argument>
                        <Argument name='authorized' value='true'/>
                        <Argument name='subject'>
                            <s>Configurator</s>
                        </Argument>
                        <Argument name='task'>
                            <ref>taskToAdd</ref>
                        </Argument>
                        <Argument name='date'>
                            <new class='java.util.Date'/>
                        </Argument>
                        <Argument name='owner'>
                            <ref>WF_CASE_OWNER</ref>
                        </Argument>
                        <Argument name='taskDefinition'>
                            <new class='com.waveset.object.GenericObject'>
                                <map>
                                    <s>id</s>
                                    <ref>accountId</ref>
                                </map>
                            </new>
                        </Argument>
                    </Action>
                </Activity>I have set up a scheduler that correctly scans all the user objects for this workflow name, and the ‘Generate Email’ workflow is periodically run.
    The problem is when it gets to the Generate Email workflow, all the variables that were set when the deferred task was created are gone. Both <ref>id</ref> and <Variable name=’id’ input=’true’/> return null.
    Setting the following in the TaskSchedule object did not help, as the string value $(id) is passed into the workflow instead of the id itself. I cannot debug the TaskSchedule as the Netbeans IDE does not allow me to put in breakpoints on this file.
    <Variables>
        <Object>
          <Attribute name='id' value='$(id)'/>
        </Object>
      </Variables>My question is, how do I pass variables into a workflow via a deferred task?

    Hi,
    Here is an example that I found that may assist.
    <Activity name='setDefTask'>
         <Action application='com.waveset.session.WorkflowServices'>
           <Argument name='op' value='addDeferredTask'/>
           <Argument name='name' value='$(user)'/>
           <Argument name='task' value='$(taskType)'/>
           <Argument name='date' value='$(date)'/>
           <Argument name='description' value='$(taskDescription)'/>
           <Argument name='taskDefinition'>
              <Object>
                  <Attribute name='Arg1' value='value1'/>
                  <Attribute name='Arg2' value='value2'/>
                  <Attribute name='Arg3' value='value3'/>
              </Object>
           </Argument>
         </Action>
         <Transition to='end'/>
    </Activity>Hope it helps

Maybe you are looking for

  • Vendor liabilities customised aging report

    Dear Experts, My client needed Vendor Liabilities Report month wise for 12 Months as system Vendor Liabilities Aging report show only four months reports and rest of in cumulative bal. so client was needed a report in for almost 12 months  criteria a

  • Interactive Report - comparing user entered text field against a table field - the comparison is not finding a hit when it should.

    Example User enters 12345 in a pre filter ----- item_number field and this value exist in the table but its defined as VARCHAR2(2000). No match is found.  Do I need to define this text field in a certain way so that a match occurs - say in the elemen

  • How do I print in draft mode on Epson Workforce 3540

    I just bought and set up an Epson Workforce all in one printer.  Everything is working fine, except that I can't get it to print in draft mode. I've tried a few different applications and all are the same.  When I go to print, I get a window that inc

  • Screen freeze on an internet Tab?

    I have a new macbook pro and at times when i have the internet with multiple tabs, i move the cursur over the screen in a way which alters the resolution of that tab only.  then on i cannot alter anything on that tab, click buttons, change text etc..

  • 2-java clients communicate with java based web-service

    I'm new 2 web-services. I need to create 2-java clients(a game like chess) & communicate them through a java based web-service. I can create the web service.(using Netbeans getting started tutorial.only the basic stuff) when we create the 2-clients a