Workflow SWC_GET_TABLE

Hi all,
I am creating a rule to retrieve the email-Id and position of the user .for this I have taken the copy of standard FM SWX_GET_MANAGER and adding my code into it.
My problem is , i have data into internal table in FM.How to transfer this dat into wrokflow containe?
below pasting the code I have added:-
SELECT agent email zposition state from zagent into table it_zagent
                                     for all entries in actor_tab where agent = actor_tab-objid.
swc_container lt_container.
swc_create_container lt_container.
  SWC_SET_TABLE lt_container 'ZAGENT' it_agent .
Please suggest , gow to take into WF container with steps.

Hi
First of all you define Rules to determine the agents dynamically and. Now I could not get what exactly you want to bind .
If Am not wrong you want to pass the ZAGENT data to the workflow conatiner . Well even I have come across the similar issue where i need to pass the data from the BSP application to workflow conatiner then all you have to do is
Declare a Multiline container element in your workflow container which has the same Name(ZAGENT) and same Type of ZAGENT in the Workflow Conatiner and in the propoerties tab you select both Import and Export checkboxes.
And remaining  what ever you have written in the coding don't change and you have to assign the Rule to the Workitem or mail
This will resolve your issue.

Similar Messages

  • In Workflow, How to get and set table values at runtime.

    Hi All,
    I m having a doubt,
    here in my workflow, i have used a  object where in i have made a 'Z' method which is suppose to populate a table container.
    Actually after using std SOFC-COMPOSE activity my table which has 4 user id's contains only 1 user id who has runt that activity.
    So in order to get all 4 user's back in the container i made a 'Z' method, which will populate the values back in tht user_id's table.
    But it is not doing so.
    Can you please help me as to how to do it?
    I m sending u the code that i hav written in the method.
    There are 2 codes i tried.
    first:
    BEGIN_METHOD ZPOPULATE CHANGING CONTAINER.
    data : User_Release type table of zfitlevel-zuid,
           wa_user_release type zfitlevel-zuid.
    data: User type table of zfitlevel-zuid.
    swc_get_table container 'User_Release'  User_Release.
    wa_user_release = 'USNOSIJOH'.
    append wa_user_release to User_Release.
    wa_user_release = 'USNOSOSAT'.
    append wa_user_release to User_Release.
    wa_user_release = 'USNOANMER'.
    append wa_user_release to User_Release.
    swc_set_table container 'User_Release'  User_Release.
    END_METHOD.
    and second :  Suppose User is the tabel that has correct values at run-time.
    BEGIN_METHOD ZPOPULATE CHANGING CONTAINER.
    data : User_Release type table of zfitlevel-zuid,
           wa_user_release type zfitlevel-zuid.
    data: User type table of ZUSRID.
    swc_get_table container 'User'  User.
    swc_get_table container 'User_Release'  User_Release.
    User_Release[] = User[].
    swc_set_table container 'User_Release'  User_Release.
    END_METHOD.
    Please let me know if anyone can solve my doubt asap.
    Thanks & Regards,
    Alpa

    Hi
    Thanks for the reply.
    But here in my case, there is a problem.
    The table container in Workflow wil hav dynamic entries.
    It will hav to pick it from other dynamic container elements (all single line) and append them in this container table.
    For eg:
    at runtime:
    User1 = 'USABC'
    User_table = 'USABC'
                       'USLMN'
                       'USPQR'
                       'USXYZ'
    after one of these user execute a compose mail activity of SOFM-COMPOSE,
    the User_table is left with only one user id who has executed the activity compose.
    suppose USABC executes it so after that the conatiner values are:
    User1 = 'USABC'
    User_table = 'USABC'
    Now i want that this table container shud hav all 4 values even after that activity for other purpose.
    So how can i achieve that?
    Thanks & Regards,
    Alpa
    Edited by: siri on Jul 9, 2008 8:32 PM

  • Delete/display/copy attachments in the workflow

    Hello,
    I'm creating a workflow which contains a pdf attachment. This attachment is created or inserted with the start form.
    During the workflow I want to delete the attachment and include a new one. Another thing I want to do is attach the pdf document to an other  BOR object.
    The thing what I have done so far but didn't work:
    I created an activity which moves the attachment to a method so I could work or change the attachment. I know their is an automatic binding with the container '_Attach_Objects' but I couldn't see the contents in the executed method when I read it out on the way below
    Here a part of the method to get the content of the '_Attach_Object' container.
    BEGIN_METHOD DISPLAY_ATTACHMENT CHANGING CONTAINER.
    DATA attach TYPE SWC_OBJECT OCCURS 0,
                ZSWC_OBJECT TYPE TABLE OF SWC_OBJECT.
    swc_get_table container '_ATTACH_OBJECTS' attach.
    SWC_GET_TABLE CONTAINER 'ZSWC_OBJECT' ZSWC_OBJECT.
    BREAK-POINT.
    END_METHOD.
    With the binding SWC_GET_TABLE I don't get the appropriate values in the container.
    How do I get the contents of the container in the method so I could delete the attachment on a nice way or to copy the content to a new BOR Object?
    Kind regards,
    Richard Meijn

    The reason why I want to change/delete the attachment is that I create a workflow for a signature registration.  The signature is on the pdf form. The signature is checked by employees and if the signature is not correct the workflow goes back to requestor to give in a new pdf document.
    The first pdf document has to be removed from the workflow and from the document storage. If the signature is correct I want to copy the attached document to a business object with a GOS  object.
    Kind regards,
    Richard Meijn

  • Workflow material document.

    Hi Exist any workflow to show a material documen  using tnx MIGO ?

    yeah I know ,  I´m not very expert in WF , the thing is that there is a work item of user decision that have two branches ( approv, disaprov.) , before in 4.6C when the user checked  to the business workflow he had three posible decisions of them aprov, disaprov and DISPLAY now in Ecc 6.0 display disapear . this work item uses the following function. , thank you if you can make a little effort to help me.
    I was thinking to use WAPI but im not sure if it is the solution.
    fUNCTION ZMM_WF_DECISION.
    *"*"Interfase local
    *"  IMPORTING
    *"     REFERENCE(I_INFO) TYPE  SWR_WIPR_I
    *"  EXPORTING
    *"     REFERENCE(E_INFO) TYPE  SWR_WIPR_E
    "*"Interfase local
    "  IMPORTING
    "     REFERENCE(I_INFO) TYPE  SWR_WIPR_I
    "  EXPORTING
    "     REFERENCE(E_INFO) TYPE  SWR_WIPR_E
    * Container Set Table
      DEFINE swc_set_table.
        call function 'SWC_TABLE_SET'
          EXPORTING
            element   = &2
          TABLES
            container = &1
            table     = &3
          EXCEPTIONS
            others    = 1.
      END-OF-DEFINITION.
    * Container Get Table
      DEFINE swc_get_table.
        call function 'SWC_TABLE_GET'
          EXPORTING
            element   = &2
          TABLES
            container = &1
            table     = &3
          EXCEPTIONS
            not_found = 8
            is_null   = 4
            others    = 1.
      END-OF-DEFINITION.
      DATA: container TYPE  swcont OCCURS 0 WITH HEADER LINE,
            cont_tmp  TYPE swcont OCCURS 0 WITH HEADER LINE,
            swwwihead TYPE swwwihead,
            p_memory  TYPE char15,
            t_contob  LIKE sww_contob,
            p_mblnr   LIKE mkpf-mblnr,
            p_mjahr   LIKE mkpf-mjahr.
      DATA: BEGIN OF text OCCURS 10,
              decision_text LIKE sww_cont-value,
            END OF text.
      CLEAR container.
      REFRESH container.
      CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
        EXPORTING
          OBJECT_TYPE             = 
          OBJECT_KEY              =
          EVENT                   =
    *     COMMIT_WORK             = 'X'
    *     EVENT_LANGUAGE          = SY-LANGU
    *     LANGUAGE                = SY-LANGU
    *     USER                    = SY-UNAME
    *     IFS_XML_CONTAINER       =
    *   IMPORTING
    *     RETURN_CODE             =
    *     EVENT_ID                =
    *   TABLES
    *     INPUT_CONTAINER         =
    *     MESSAGE_LINES           =
    *     MESSAGE_STRUCT          =
      CALL FUNCTION 'SWW_WI_CONTAINER_READ'
           EXPORTING
                wi_id        = i_info-wi_id
           TABLES
                wi_container = container.
    * CALL FUNCTION 'SAP_WAPI_READ_CONTAINER'
    *   EXPORTING
    *     WORKITEM_ID                    = i_info-wi_id
    *    LANGUAGE                       = SY-LANGU
    *    USER                           = SY-UNAME
    **IMPORTING
    **    RETURN_CODE                    =
    **    IFS_XML_CONTAINER              =
    **    IFS_XML_CONTAINER_SCHEMA       =
    *  TABLES
    *    SIMPLE_CONTAINER               = container
    **    MESSAGE_LINES                  =
    **    MESSAGE_STRUCT                 =
    **    SUBCONTAINER_BOR_OBJECTS       =
    **    SUBCONTAINER_ALL_OBJECTS       =
      swc_get_table container   '_DECISION_TEXT'       text.
      READ TABLE text WITH KEY decision_text(4) = '9999'.
      IF sy-subrc NE 0.
        MOVE '9999Visualizar Entrada de Mercancias' TO text-decision_text.
        APPEND text.
        swc_set_table container   '_DECISION_TEXT'       text.
    *    CALL FUNCTION 'SAP_WAPI_WRITE_CONTAINER'
    *      EXPORTING
    *        WORKITEM_ID             = i_info-wi_id
    *       LANGUAGE                = SY-LANGU
    *       ACTUAL_AGENT            = SY-UNAME
    *       DO_COMMIT               = 'X'
    **       IFS_XML_CONTAINER       =
    **     IMPORTING
    **       RETURN_CODE             =
    *     TABLES
    *       SIMPLE_CONTAINER        = container.
    **       MESSAGE_LINES           =
    **       MESSAGE_STRUCT          =
        CALL FUNCTION 'SWW_WI_CONTAINER_MODIFY'
          EXPORTING
            wi_id        = i_info-wi_id
            do_commit    = 'X'
          TABLES
            wi_container = container.
      ENDIF.
      CALL FUNCTION 'SWU2_INPLACE_DECISION_PROCESS'
        EXPORTING
          i_info = i_info
        IMPORTING
          e_info = e_info.
      CALL FUNCTION 'SWW_WI_CONTAINER_READ'
        EXPORTING
          wi_id        = i_info-wi_id
        TABLES
          wi_container = container.
      READ TABLE container WITH KEY element = '_RESULT'
                                    value   = '9999'.
      IF sy-subrc EQ 0.
        DELETE container INDEX sy-tabix.
        CLEAR container.
        READ TABLE container WITH KEY element = '_WI_RESULT'
                                      value   = '9999'.
        IF sy-subrc EQ 0.
          DELETE container INDEX sy-tabix.
          CLEAR container.
        ENDIF.
        CLEAR e_info-execresult.
        CALL FUNCTION 'SWW_WI_CONTAINER_DELETE'
          EXPORTING
            wi_id = i_info-wi_id.
        CALL FUNCTION 'SWW_WI_CONTAINER_INSERT'
          EXPORTING
            wi_id        = i_info-wi_id
            do_commit    = 'X'
          TABLES
            wi_container = container.
        CALL FUNCTION 'SWW_WI_HEADER_READ'
          EXPORTING
            wi_id     = i_info-wi_id
          IMPORTING
            wi_header = swwwihead.
        CALL FUNCTION 'SWW_WI_CONTAINER_READ'
          EXPORTING
            wi_id        = swwwihead-wi_chckwi
          TABLES
            wi_container = cont_tmp.
        CLEAR cont_tmp.
        READ TABLE cont_tmp WITH KEY element = 'MATERIALDOCUMENT'.
        MOVE cont_tmp-value TO p_mblnr.
        CLEAR cont_tmp.
        READ TABLE cont_tmp WITH KEY element = 'MATDOCUMENTYEAR'.
        MOVE cont_tmp-value TO p_mjahr.
        CALL FUNCTION 'SWW_WI_HEADER_READ'
          EXPORTING
            wi_id     = swwwihead-wi_chckwi
          IMPORTING
            wi_header = swwwihead.
        CASE swwwihead-wi_rh_task.
          WHEN 'WS99800003'. "Aprobacion Entrada Mercancia
            CALL FUNCTION 'MIGO_GR_CREATE'
              EXPORTING
                I_ACTION            = 'A04'
                I_REFDOC            = 'R02'
                I_NOTREE            = 'X'
                I_NO_AUTH_CHECK     = 'X'
                I_SKIP_FIRST_SCREEN = 'X'
                I_DEADEND           = 'X'
                I_OKCODE            = 'OK_GO'
                I_MBLNR             = p_mblnr
                I_MJAHR             = p_mjahr.
        ENDCASE.
      ENDIF.
      READ TABLE container WITH KEY element = '_RESULT'
                                    value   = '0001'.
      IF sy-subrc EQ 0 AND e_info-execresult EQ 'E'.
        READ TABLE container WITH KEY element = '_DECISION_PARAMETER1'.
        MOVE container-value TO p_mblnr.
        READ TABLE container WITH KEY element = '_DECISION_PARAMETER2'.
        MOVE container-value TO p_mjahr.
        PERFORM process_message USING p_mblnr p_mjahr '1'.
      ENDIF.
      READ TABLE container WITH KEY element = '_RESULT'
                                    value   = '0002'.
      IF sy-subrc EQ 0 AND e_info-execresult EQ 'E'.
        READ TABLE container WITH KEY element = '_DECISION_PARAMETER1'.
        MOVE container-value TO p_mblnr.
        READ TABLE container WITH KEY element = '_DECISION_PARAMETER2'.
        MOVE container-value TO p_mjahr.
        PERFORM process_message USING p_mblnr p_mjahr '2'.
      ENDIF.
      READ TABLE container WITH KEY element = '_RESULT'
                                    value   = '9998'.
      IF sy-subrc EQ 0.
        MOVE 'E' TO e_info-execresult.
      ENDIF.
    ENDFUNCTION.

  • Workflow container element empty

    Hi all,
    I have the following problem:
    - my workflow container has an element named 'AbsenceRequest'
    - in the element 'AbsenceRequest' I have a subelement named Comments which is a table
    - I created a business object type 'ZESS_AREQ' in SWO1 which has an attribute named 'Comments' and a method named 'Create'
    - In a report I create an object of this object type using swc_create_object and I set subelement 'Comments' to a value 'test' using swc_set_table
    - Then I call method 'Create' of the created object
    - In that method I retrieve the value from the container using swc_get_table and I receive value 'test'
    Then I have the following piece of code:
    swc_free_object lf_object.                             
    MOVE lw_areq-pernr TO object-key-personnelnumber.      
    MOVE lw_areq-id TO object-key-id.                      
    swc_create_object lf_object 'ZESS_AREQ' object-key.    
    IF sy-subrc EQ 0.                                      
       swc_raise_event lf_object 'Created' container.       
       COMMIT WORK AND WAIT.                                
    ENDIF.
    Which should start the corresponding WF (which it does), but in my WF container the subelement Comments is empty...
    Any idea what goes wrong?
    Many thanks in advance!
    Julien

    Well actually the WF container element has one entry but this entry is empty (blank)...

  • How to use data of multiline element from workflow container

    Hi,
    Can you please tell me how to access rows of multiline element of workflow container.
    Scenario is like below.
    I have values in a multiline container(table) of workflow container.
    Now inside Fork branches  i need to check for specific data in the above table and with that condition i have to send workitem.
    I hope u can understand,otherwise please revert.
    Thanks in advance,
    Madhu

    You cannot didrectly check the condition...
    what you have to do is.. write a inside the method as below and set the flag...and use the flag in condition editor...
    SWC_GET_TABLE CONTAINER 'AGENTS'  lt_agents.
    loop at lt_agents ino wa_agents.
    if wa_agents = 'A'.
    lv_flag = X.
    endif.
    endloop.
    SWC_SET_ELEMENT CONTAINER 'FLAG' lv_flag.
    Create an export parameter FLAG as char1 with export marked.
    Do the neccesary bindings from task to workflow.
    Then in workflow check this flag in condition editor.

  • Sending WD component link in email through Workflow

    Hi ,
    I have a Web dynpro component created.The WD application would trigger a Workflow through a Business Object event. In the workflow the user would receive an email on his outlook with the WD component link.
    I have 2 questions:
    1)  How will we send the email to the outlook mail? And the link would be a fairly long string as it is of a WD application.How can we send the link?
    2)  There is 1 more requirement in which there is a inventory number,which is the key field for the WD screen.The person receiving the outlook email with the link will be getting the link as
    eg: http://tcbdci20.xyz.net:8020/sap/bc/webdynpro/xyz/cbb_a4201_invmt?WiNr=4711.
    Here the "WiNr" would be the Inventory number parameter name and "4711" would be the inventory number.This link should directly take the user to the inventory number data filled on the WD screen.
    Is there any way thsis kind of link can be sent and generated?
    Many thanks for your help.
    Regards,
    Ameya Kulkarni

    Hi,
    Please see the below code by which I am able to send link more than 160 charecter.
    *** BEGIN_METHOD SEND_MAIL_TO_USERS CHANGING CONTAINER.
    * Data declaration
    DATA:
          lt_user_IDS type STANDARD TABLE OF SWHACTOR,
          ls_user_IDS type SWHACTOR,
          lt_EMAIL_ADDRESSES TYPE STANDARD TABLE OF ADR6-SMTP_ADDR,
          ls_EMAIL_ADDRESSES  type ADR6-SMTP_ADDR,
          lv_STATUS TYPE CFS_STATUS-STATUS_ID,
          Lv_Object_ID type crmd_orderadm_h-object_id,
          ls_document_data TYPE sodocchgi1,
          lt_text TYPE solisti1 OCCURS 0,
          l_document_data TYPE sodocchgi1,
          lt_receivers TYPE somlreci1 OCCURS 0,
          ls_wa_receive TYPE somlreci1,
          ls_text TYPE solisti1,
          lv_link_title  TYPE char50.
    DATA: lv_link1 TYPE char200 VALUE
    'http://golitsapd39.go-d01.local:8001/sap/bc/gui/sap/its/webgui?sap-',
          lv_link2 TYPE char200 VALUE
    'language=EN&sap-client=850&~transaction=DSWP_SAPSHORTCUT&~OkCode=',
          lv_link3 TYPE char200 VALUE '/08&pcmd=CRMVW&pmsgnum=',
          lv_link  TYPE char200.
    * Get container values
      SWC_GET_table CONTAINER 'User_ids' lt_USER_IDS.
      SWC_GET_table CONTAINER 'Email_addresses' lt_EMAIL_ADDRESSES.
      SWC_GET_ELEMENT CONTAINER 'Status' lv_STATUS.
      SWC_GET_ELEMENT CONTAINER 'Object_ID' lv_Object_ID.
    *=======================================================================
    * Createing final link
    *=======================================================================
    CONCATENATE lv_link1 lv_link2 lv_link3 lv_object_id INTO
                lv_link.
    *=======================================================================
    * createing subject
    *=======================================================================
    Condense  lv_status.
    Translate  lv_status to upper case.
    CASE lv_status.
      WHEN 'NEW'.
        CONCATENATE 'Pls assign Support Msg ' lv_object_id
        INTO ls_document_data-obj_descr SEPARATED BY space.
      WHEN 'AUTHORIZED'.
        CONCATENATE 'CR' lv_object_id 'is autorized'
        INTO ls_document_data-obj_descr SEPARATED BY space.
      WHEN 'CRCREATED'.
        CONCATENATE 'Please authorize' lv_object_id
        INTO ls_document_data-obj_descr SEPARATED BY space.
      WHEN OTHERS.
        CONCATENATE 'Support Msg' lv_object_id
        'is in' lv_status 'status'
        INTO ls_document_data-obj_descr SEPARATED BY space.
    ENDCASE.
    *=======================================================================
    * createing Body
    *=======================================================================
    * Hi
    CLEAR : ls_text.
    ls_text = 'Hi,'.
    APPEND ls_text TO lt_text.
    *Blank Line
    CLEAR : ls_text.
    ls_text = '<br></br>'.
    APPEND ls_text TO lt_text.
    CASE lv_status.
      WHEN 'NEW'.
    *Support Message has been created or reassigned in NEW status.
        CLEAR : ls_text.
        CONCATENATE 'Support Messag' lv_object_id
        'has been created or reassigned to you.'
        INTO ls_text SEPARATED BY space.
        APPEND ls_text TO lt_text.
    *Blank Line
        CLEAR : ls_text.
        ls_text = '<br>'.
        APPEND ls_text TO lt_text.
    *Please raise a CR and waith untill it is aurorized then make the status
    *ASSIGNED to continue further.
        CLEAR : ls_text.
        CONCATENATE
        'Please raise a CR and waith untill it is aurorized then make the'
        'status ASSIGNED to continue further.'
        INTO ls_text SEPARATED BY space.
        APPEND ls_text TO lt_text.
    *Blank Line
        CLEAR : ls_text.
        ls_text = '</br>'.
        APPEND ls_text TO lt_text.
    WHEN 'AUTHORIZED'.
        CLEAR : ls_text.
        CONCATENATE 'CR' lv_object_id 'is authorized.'
        INTO ls_text SEPARATED BY space.
        APPEND ls_text TO lt_text.
    *Blank Line
        CLEAR : ls_text.
        ls_text = '<br>'.
        APPEND ls_text TO lt_text.
    *Please check and make the status of the support message ASSIGNED
    *status to continue further.
        CLEAR : ls_text.
        CONCATENATE 'Please check and make the status of the support'
                    'message ASSIGNED status to continue further.'
        INTO ls_text SEPARATED BY space.
        APPEND ls_text TO lt_text.
    *Blank Line
        CLEAR : ls_text.
        ls_text = '</br>'.
        APPEND ls_text TO lt_text.
    WHEN 'CRCREATED'.
        CLEAR : ls_text.
        CONCATENATE 'CR' lv_object_id 'has been created.'
        INTO ls_text SEPARATED BY space.
        APPEND ls_text TO lt_text.
    *Blank Line
        CLEAR : ls_text.
        ls_text = '<br>'.
        APPEND ls_text TO lt_text.
    *Please check and authorized it.
        CLEAR : ls_text.
        ls_text = 'Please check and authorized it.'.
        APPEND ls_text TO lt_text.
    *Blank Line
        CLEAR : ls_text.
        ls_text = '</br>'.
        APPEND ls_text TO lt_text.
    WHEN OTHERS.
        CLEAR : ls_text.
        CONCATENATE 'Support Message' lv_object_id
        'is in' lv_status 'status now.'
        INTO ls_text SEPARATED BY space.
        APPEND ls_text TO lt_text.
    *Blank Line
        CLEAR : ls_text.
        ls_text = '<br>'.
        APPEND ls_text TO lt_text.
    *Please check and start working as soon as possible.
        CLEAR : ls_text.
        ls_text = 'Please check and start working as soon as possible.'.
        APPEND ls_text TO lt_text.
    *Blank Line
        CLEAR : ls_text.
        ls_text = '</br>'.
        APPEND ls_text TO lt_text.
    ENDCASE.
    *Blank Line
    CLEAR : ls_text.
    ls_text = '</br></br>'.
    APPEND ls_text TO lt_text.
    *Please click the following link to take a action.
    CLEAR : ls_text.
    ls_text = 'Please click the following link to take a action.'.
    APPEND ls_text TO lt_text.
    *inseting link
    CLEAR : ls_text.
    CONCATENATE 'VIEW/EDIT Object' lv_object_id INTO lv_link_title
    SEPARATED BY space.
    CONCATENATE '<A HREF=' lv_link '>'
       INTO ls_text.
    APPEND ls_text TO lt_text.
    CLEAR : ls_text.
    CONCATENATE  '<H5>' lv_link_title '</H5></A>'
    INTO ls_text.
    APPEND ls_text TO lt_text.
    *Blank Line
    CLEAR : ls_text.
    ls_text = '<br></br>'.
    APPEND ls_text TO lt_text.
    *Adding Signature
    *WThanks and regards
    CLEAR : ls_text.
    ls_text = 'Thanks and regards,'.
    APPEND ls_text TO lt_text.
    *Blank Line
    CLEAR : ls_text.
    ls_text = '<br>'.
    APPEND ls_text TO lt_text.
    *WF-Batch
    CLEAR : ls_text.
    ls_text = 'WF-BATCH'.
    APPEND ls_text TO lt_text.
    * Receiver
    Loop at lt_user_IDS into ls_user_IDS.
    ls_wa_receive-rec_type = 'G'.        "SAP User
    ls_wa_receive-receiver = ls_user_IDS. "Mail Address
    APPEND ls_wa_receive TO lt_receivers.
    Endloop.
    Loop at lt_EMAIL_ADDRESSES into ls_EMAIL_ADDRESSES.
    ls_wa_receive-rec_type = 'U'. "Internet User
    ls_wa_receive-receiver = ls_EMAIL_ADDRESSES. "Mail Address
    APPEND ls_wa_receive TO lt_receivers.
    Endloop.
    *This function module is used to send mail
    CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
      EXPORTING
        document_data              = ls_document_data
        document_type              = 'HTM'
        put_in_outbox              = 'X'
        commit_work                = 'X'
      TABLES
        object_content             = lt_text
        receivers                  = lt_receivers
      EXCEPTIONS
        too_many_receivers         = 1
        document_not_sent          = 2
        document_type_not_exist    = 3
        operation_no_authorization = 4
        parameter_error            = 5
        x_error                    = 6
        enqueue_error              = 7
        OTHERS                     = 8.
    *If Mail Send Successful
    IF sy-subrc EQ 0.
      COMMIT WORK.
    *   Push mail out from SAP outbox
      SUBMIT rsconn01 WITH mode = 'INT' AND RETURN.          "#EC CI_SUBMIT
    ENDIF.
    END_METHOD. ***
    Thanks and regards,
    SNJY

  • Passing value from method to Workflow

    Hi All,
    I am new to workflow. I am trying simple examples to understand the concepts of work flow.
    I have copied a std business object and I have a method in that. Now, I am trying to pass some value to this method from the work flow and get back some value after manipulation with in this method.
    In the program for the method,  I need to get 2 parameters as input and one parameter as outut. With in this method I am trying to write the code for adding this 2 nos. I have seen some Help docs and came to know I should use SWC_GET_ELEMENT_CONTAINER and SWC_SET_ELEMENT_CONTAINER for this. But, I am ot sure of the syntax.
    Can you help me with a sample program for this...
    Any help is highly appreciated.
    Thanks,
    Jai Shankar

    hi Jai Shankar,
    I give you the sample code of the method where i am finding number of agents
    BEGIN_METHOD ZLCPRNUMBEROFUSERS CHANGING CONTAINER.
    DATA:
          TEMAILID LIKE SOLI OCCURS 0,
          TAPPROVERS LIKE ZSAFAPPROVERS OCCURS 0,
          WAPPROVERS LIKE TABLE OF ZSAFAPPROVERS WITH HEADER LINE.
          DATA NUMBER LIKE VBAK-VBTYP.
          DATA emailid TYPE STRING.
          data userid type string.
    this is the coding where the value that you give the method container
      SWC_GET_TABLE CONTAINER 'TEmailId' TEMAILID.
      SWC_GET_TABLE CONTAINER 'TApprovers' TAPPROVERS.
      SWC_GET_ELEMENT CONTAINER 'NUMBER' NUMBER.
    here you can use your own coding like (select query or any other)
      CALL FUNCTION 'Z_LC_PR_NUMBER_OF_USERS'
        TABLES
          T_EMAIL_ID = TEMAILID
          T_APPROVERS = TAPPROVERS
        EXCEPTIONS
          OTHERS = 01.
      CASE SY-SUBRC.
        WHEN 0.            " OK
        WHEN OTHERS.       " to be implemented
      ENDCASE.
      SWC_SET_TABLE CONTAINER 'TEmailId' TEMAILID.
      SWC_SET_TABLE CONTAINER 'TApprovers' TAPPROVERS.
    READ TABLE TAPPROVERS INDEX NUMBER INTO WAPPROVERS.
    CALL FUNCTION 'Z_LC_GET_EMPLOYEE_INFO'
    EXPORTING
        USER_ID                   = WAPPROVERS-APPROVER_USRID
    IMPORTING
         EMP_EMAIL                 = emailid.
    here i am doing some manupulation in the function module and i am getting that value to the method container as below.
      SWC_SET_ELEMENT CONTAINER 'EMAILID' emailid.
      SWC_SET_ELEMENT CONTAINER 'USERID' WAPPROVERS-APPROVER_USRID.
    SWC_SET_TABLE CONTAINER 'EMAILID' emailid.
    SWC_SET_TABLE CONTAINER 'TApprovers' TAPPROVERS.
    END_METHOD.
    I think it is helpful for you,
    Regards,
    Balaji E.

  • Buttons in Workflow.

    Goo mourning Guys , I m not very expert in workflow for that reason i need some help, in the inbox of the mailbox  of one of my users,  he has some Purchase orders to approve , However before upgrade to Ecc 6.0 he has 4 buttons  ( in the tips an tricks areas , you got them after push  )  to  Choose one of the following alternatives : Visualize , Approved, cancel and keep work item in the box , etc. Now in Ecc 6.0  One of this button dissapeared, Why is that ? , What can i check ? . Thank you very much .

    Guys I ´ve still continued with some troubles here , I .' ve checked the decision user block and now I can see that it only have to branches , the good receipt display issue i shandle with a function used in decision user :
    UNCTION ZMM_WF_DECISION.
    *"*"Interfase local
    *"  IMPORTING
    *"     REFERENCE(I_INFO) TYPE  SWR_WIPR_I
    *"  EXPORTING
    *"     REFERENCE(E_INFO) TYPE  SWR_WIPR_E
    * Container Set Table
      DEFINE swc_set_table.
        call function 'SWC_TABLE_SET'
             exporting
                  element   = &2
             tables
                  container = &1
                  table     = &3
             exceptions
                  others    = 1.
      END-OF-DEFINITION.
    * Container Get Table
      DEFINE swc_get_table.
        call function 'SWC_TABLE_GET'
             exporting
                  element   = &2
             tables
                  container = &1
                  table     = &3
             exceptions
                  not_found = 8
                  is_null   = 4
                  others    = 1.
      END-OF-DEFINITION.
      DATA: container TYPE swcont OCCURS 0 WITH HEADER LINE,
            cont_tmp  TYPE swcont OCCURS 0 WITH HEADER LINE,
            swwwihead TYPE swwwihead,
            p_memory  TYPE char15,
            t_contob  LIKE sww_contob,
            p_mblnr   LIKE mkpf-mblnr,
            p_mjahr   LIKE mkpf-mjahr.
      DATA: BEGIN OF text OCCURS 10,
              decision_text LIKE sww_cont-value,
            END OF text.
      CLEAR container.
      REFRESH container.
      CALL FUNCTION 'SWW_WI_CONTAINER_READ'
           EXPORTING
                wi_id        = i_info-wi_id
           TABLES
                wi_container = container.
      swc_get_table container   '_DECISION_TEXT'       text.
      READ TABLE text WITH KEY decision_text(4) = '9999'.
      IF sy-subrc NE 0.
        MOVE '9999Visualizar Entrada de Mercancias' TO text-decision_text.
        APPEND text.
        swc_set_table container   '_DECISION_TEXT'       text.
        CALL FUNCTION 'SWW_WI_CONTAINER_MODIFY'
             EXPORTING
                  wi_id        = i_info-wi_id
                  do_commit    = 'X'
             TABLES
                  wi_container = container.
      ENDIF.
      CALL FUNCTION 'SWU2_INPLACE_DECISION_PROCESS'
           EXPORTING
                i_info = i_info
           IMPORTING
                e_info = e_info.
      CALL FUNCTION 'SWW_WI_CONTAINER_READ'
           EXPORTING
                wi_id        = i_info-wi_id
           TABLES
                wi_container = container.
      READ TABLE container WITH KEY element = '_RESULT'
                                    value   = '9999'.
      IF sy-subrc EQ 0.
        DELETE container INDEX sy-tabix.
        CLEAR container.
        READ TABLE container WITH KEY element = '_WI_RESULT'
                                      value   = '9999'.
        IF sy-subrc EQ 0.
          DELETE container INDEX sy-tabix.
          CLEAR container.
        ENDIF.
        CLEAR e_info-execresult.
        CALL FUNCTION 'SWW_WI_CONTAINER_DELETE'
             EXPORTING
                  wi_id = i_info-wi_id.
        CALL FUNCTION 'SWW_WI_CONTAINER_INSERT'
             EXPORTING
                  wi_id        = i_info-wi_id
                  do_commit    = 'X'
             TABLES
                  wi_container = container.
        CALL FUNCTION 'SWW_WI_HEADER_READ'
             EXPORTING
                  wi_id     = i_info-wi_id
             IMPORTING
                  wi_header = swwwihead.
        CALL FUNCTION 'SWW_WI_CONTAINER_READ'
             EXPORTING
                  wi_id        = swwwihead-wi_chckwi
             TABLES
                  wi_container = cont_tmp.
        CLEAR cont_tmp.
        READ TABLE cont_tmp WITH KEY element = 'MATERIALDOCUMENT'.
        MOVE cont_tmp-value TO p_mblnr.
        CLEAR cont_tmp.
        READ TABLE cont_tmp WITH KEY element = 'MATDOCUMENTYEAR'.
        MOVE cont_tmp-value TO p_mjahr.
        CALL FUNCTION 'SWW_WI_HEADER_READ'
             EXPORTING
                  wi_id     = swwwihead-wi_chckwi
             IMPORTING
                  wi_header = swwwihead.
        CASE swwwihead-wi_rh_task.
          WHEN 'WS99800003'. "Aprobacion Entrada Mercancia
            CALL FUNCTION 'MIGO_GR_CREATE'
                 EXPORTING
                      I_ACTION            = 'A04'
                      I_REFDOC            = 'R02'
                      I_NOTREE            = 'X'
                      I_NO_AUTH_CHECK     = 'X'
                      I_SKIP_FIRST_SCREEN = 'X'
                      I_DEADEND           = 'X'
                      I_OKCODE            = 'OK_GO'
                      I_MBLNR             = p_mblnr
                      I_MJAHR             = p_mjahr.
        ENDCASE.
      ENDIF.
      READ TABLE container WITH KEY element = '_RESULT'
                                    value   = '0001'.
      IF sy-subrc EQ 0 AND e_info-execresult EQ 'E'.
        READ TABLE container WITH KEY element = '_DECISION_PARAMETER1'.
        MOVE container-value TO p_mblnr.
        READ TABLE container WITH KEY element = '_DECISION_PARAMETER2'.
        MOVE container-value TO p_mjahr.
        PERFORM process_message USING p_mblnr p_mjahr '1'.
      ENDIF.
      READ TABLE container WITH KEY element = '_RESULT'
                                    value   = '0002'.
      IF sy-subrc EQ 0 AND e_info-execresult EQ 'E'.
        READ TABLE container WITH KEY element = '_DECISION_PARAMETER1'.
        MOVE container-value TO p_mblnr.
        READ TABLE container WITH KEY element = '_DECISION_PARAMETER2'.
        MOVE container-value TO p_mjahr.
        PERFORM process_message USING p_mblnr p_mjahr '2'.
      ENDIF.
      READ TABLE container WITH KEY element = '_RESULT'
                                    value   = '9998'.
      IF sy-subrc EQ 0.
        MOVE 'E' TO e_info-execresult.
      ENDIF.
    ENDFUNCTION.
    FORM process_message USING p_mblnr p_mjahr result.
    *{   INSERT         AP                                         1
    data: ti_mseg  LIKE mseg OCCURS 0 WITH HEADER LINE,
          ti_ekko  like ekko occurs 0 with header line,
          ti_lfa1  like lfa1 occurs 0 with header line,
          ti_adr6  like adr6 occurs 0 with header line .            .
    *}   INSERT
      DATA: p_objky LIKE nast-objky.
      IF result EQ '1'.
    *{   REPLACE        Ali Palacios : AP                                       3
    *    SELECT SINGLE * FROM mseg
        SELECT SINGLE * FROM mseg into ti_mseg
    *}   REPLACE
                       WHERE mblnr EQ p_mblnr
                         AND mjahr EQ p_mjahr
                         AND zeile EQ '0001'.
        CHECK sy-subrc EQ 0.
    *{   REPLACE         AP                                           2
    *    SELECT SINGLE * FROM ekko WHERE ebeln EQ mseg-ebeln.
        SELECT SINGLE * FROM ekko into ti_ekko WHERE ebeln EQ ti_mseg-ebeln.
    *}   REPLACE
        CHECK sy-subrc EQ 0.
    *   Verifica se provedor tiene e-mail
    *{   REPLACE        AP                                         5
    *    CLEAR lfa1.
        CLEAR ti_lfa1.
    *}   REPLACE
    *{   REPLACE         AP                                         6
    *    SELECT SINGLE * FROM lfa1
        SELECT SINGLE * FROM lfa1 into ti_lfa1
    *}   REPLACE
    *{   REPLACE        AP                                          4
    *                   WHERE lifnr EQ ekko-lifnr.
                       WHERE lifnr EQ ti_ekko-lifnr.
    *}   REPLACE
        CHECK sy-subrc EQ 0.
    *{   REPLACE         AP                                          7
    *    CLEAR adr6.
        CLEAR ti_adr6.
    *}   REPLACE
    *{   REPLACE        AP                                         8
    *    SELECT SINGLE * FROM adr6
        SELECT SINGLE * FROM adr6 into ti_adr6
    *}   REPLACE
    *{   REPLACE        AP                                         9
    *                   WHERE addrnumber EQ lfa1-adrnr.
                       WHERE addrnumber EQ ti_lfa1-adrnr.
    *}   REPLACE
    *{   REPLACE        AP                                         10
    *    IF adr6-smtp_addr IS INITIAL.
        IF ti_adr6-smtp_addr IS INITIAL.
    *}   REPLACE
          UPDATE nast SET vstat = '1'
                    WHERE kappl EQ 'ME'
                      AND objky EQ p_objky
                      AND kschl EQ 'ZME3'.
        ELSE.
          CONCATENATE p_mblnr p_mjahr '0001'
               INTO p_objky.
          UPDATE nast SET vsztp = '1'
                    WHERE kappl EQ 'ME'
                      AND objky EQ p_objky
                      AND kschl EQ 'ZME3'.
          UPDATE nast SET vstat = '1'
                    WHERE kappl EQ 'ME'
                      AND objky EQ p_objky
                      AND kschl EQ 'ZWE3'.
      ENDIF.
    ELSE.
      CONCATENATE p_mblnr p_mjahr '0001'
           INTO p_objky.
      UPDATE nast SET vstat = '1'
                WHERE kappl EQ 'ME'
                  AND objky EQ p_objky.
    ENDIF.
    ENDFORM.
    but it doesnt seem to work . Is there any other way to display the document, without add a branch ?? thank you guys.

  • Error while deploying a workflow in OWB

    Hi,
    I am getting the below error while deploying a workflow in Control Center.
    ORA-29532: Java call terminated by uncaught Java exception: java.sql.SQLException: The file /u01/app/oracle/product/11.2.0.2/dbhome_1/owb/bin/admin/rtrepos.properties cannot be accessed or has not been properly created on the server XXXXXX. If the file does not exist or if the database owner (normally user 'oracle') does not have the required file permissions or if the file has not been properly created then the file can be recreated by running the SQL*Plus script /u01/app/oracle/product/11.2.0.2/dbhome_1/owb/rtp/sql/reset_repository.sql (in a RAC environment the file must be manually copied to each server which is used for OWB). Otherwise if using a 10.2 database instance, then please run the SQL*Plus script /u01/app/oracle/product/11.2.0.2/dbhome_1/owb/UnifiedRepos/reset_owbcc_home.sql.
    Did any one faced this issue before?
    Kindly let me know the steps to resolve the issue.
    Thanks.

    Hi Vidyanand,
    Did you create the runtime access user using the runtime assistant? Did you select the correct runtime repository (if you have more) to associate your runtime access user with?
    Note that there are 4 database roles being created when you create a runtime repository owner:
    - OWB_A_<runtime repository owner>
    - OWB_D_<runtime repository owner>
    - OWB_R_<runtime repository owner>
    - OWB_U_<runtime repository owner>
    If you would grant those roles to a user, then that user becomes an access user for the user with username <runtime repository owner>.
    Note that you can also use the runtime repository credentials to connect to the runtime repository for deployment purposes, but you may not want that because of security concerns.
    Thanks,
    Mark.

  • Questions on OCS and workflow

    I am wondering whether I can configure the following:
    - Can I have multiple views? Example, view documents by Author, Project, Category? Can I customize document
    views?
    - Can I control access rights on a single document?
    - Can I monitor or extract a report on how often a document is accessed?
    In addition, I have the following problems with OCS Workflow:
    - The Workflow has no default email notification. Documentations indicated that Email Notification has to be configured to work with SendMail. Can Email notification be configured with OCS Mail instead?
    It does not make sense to use SendMail instead of OCS Mail.
    - Document can be viewed by Workspace members once it is uploaded. What is the purpose of workflow then?
    - Document has to be manually submitted for review to initiate a Workflow process. Can this be performed automatically?
    - WorkFlow approver is defined by the user. It should have predefined approvers.
    - In Workflow notification, Notification Detail provides the URL but does not have a URL link back to the document. In this case, the review process is manual because the approver does not have an easy
    way to preview the document.
    Are my comments correct? Are there any workarounds?

    Roger,
    1) The default SPINCOUNT value is 0 (no spinning) for all platforms that are supported today. (At one time we had a default value of 5000 for Sequent hardware, but it has been many years since we supported that platform.) The SPINCOUNT value that will work best for any application depends on many factors, including the number of CPUs on the machine, the hardware platform, and the indvidual application. SPINCOUNT will only be useful when the machine has more than one CPU.
    2) /Q logs Q_CAT:1447 after 50 unsuccessful attempts to obtain the semaphore when the semaphore has never been released and reobtained by a different process or the same process during that period. The Access Control List code uses the same rule for logging LIBTUX_CAT:1511. If TMSPINCOUNT is set, then the number of unsuccessful attempts to obtain the semaphore is incremented by 1 only after TMSPINCOUNT spins have been done.
    Code for the BB semaphore and the semaphore used by /Domain follows a different rule. This code will log LIBTUX_CAT:5005 or LIBGW_CAT:5010 if a process has to wait for the semaphore for 10 seconds and the semaphore has never been released by the original owner during this time period.
    3) TMSPINCOUNT is used for the BB semapahore, AOM semaphore, ACL semaphore, /Domain semaphore, and /Q semaphore. Locking the GTT uses the same BB semaphore that used to lock other tables in the BB.
    Regards,
    Ed

  • How can I display a SP 2010 out of the box workflow's task assignees via powershell?

    There are days where one of the 250+ workflows at the site has attempted to send email to someone no longer at the company.
    I would like to find a way to go through the farm and display all the list URLs that have workflows, and the mail addresses associated to the workflows.
    This way I can track down the workflows that need to be updated to remove the missing users.
    I have started a bit of script to do this. In my script, I just had a site collection - I figured that if I can get that to work, then surely wrapping another loop for the rest of the farm won't be bad. 
    However, for some reason, I am not seeing the output that I expected to show the mail addresses.
    I am hoping a different set of eyes might see what I am missing. It was my understanding that the AssociationData property was XML that contained information about the assignees for tasks, the carbon copy list, etc.
    Maybe I misunderstood something that I read?
    $outLoc = "d:\temp\wfdata.txt"
    $web = Get-SPWeb -Identity "http://myfarm/sites/it/"
    foreach ($list in $web.Lists)
     $associationColl=$list.WorkflowAssociations
     foreach ($association in $associationColl)
           $association.AssociationData | Out-File $outLoc
    $web.Dispose()
    I want to thank you for the helpful tips that so often appear on this list. They help me when I am reading over old threads to figure out what to do. I am hoping that tips on this thread will likewise be helpful.

    Hi,
    With
    SPWorkflowAssociation.AssociationData property, we can get the assignees’ information. Your script can
    be able to retrieve a XML format data which contains the user name we need:
    So the next step would be getting the user name by parsing the XML data we got.
    The two links below will show how to parse XML with PowerShell:
    http://stackoverflow.com/questions/18032147/parsing-xml-using-powershell
    http://blogs.technet.com/b/heyscriptingguy/archive/2012/03/26/use-powershell-to-parse-an-xml-file-and-sort-the-data.aspx
    With the user name, we can get the
    Email property of an user with the scripts as the link below provided:
    http://davidlozzi.com/2012/03/07/using-powershell-to-access-sharepoint-sites/  
    Best regards
    Patrick Liang
    TechNet Community Support

  • Creating a Role view in a workflow

    I'm trying to create a role view in my workflow with the following code but it gives me an error: com.waveset.util.InternalError: Unable to locate ViewHandler for 'role'.
    <Action application='com.waveset.session.WorkflowServices'>
                <Argument name='op' value='createView'/>
                <Argument name='type' value='Role'/>
                <Return from='view' to='view'/>
              </Action>Has anyone created a role from a workflow, java or SPML?

    nvm figured it out.
    <Action id='0' application='com.waveset.session.WorkflowServices'>
              <Argument name='op' value='createView'/>
              <Argument name='type' value='Role'/>
              <Argument name='viewId' value='Role'/>
              <Argument name='Form' value='Empty Form'/>
              <Argument name='authorized' value='true'/>
              <Return from='view' to='role'/>
            </Action>       

  • Note: Due to heavy load, the latest workflow operation has been queued. It will attempt to resume at a later time

    Dear all,
    sorry for opening another thread on this.
    I think I have a performance issue with workflows attached to document sets in SharePoint. And I say “I think” because people keep telling me that this is the way it just is.
    The user creates a new document set, which triggers a workflow in which the user has to confirm/review/approve a series of tasks. The time it takes from clicking the OK button on those task form to the workflow status moving to the next step is about 4 seconds.
    And visiting that status page within those 4 seconds brings up the infamous “Note: Due to heavy load, the latest workflow operation has been queued. It will attempt to resume at a later time.” message.
    Hitting Refresh in the browser after those 4 seconds will make the new workflow status appear and the red text go away.
    Is that normal? Is that the performance that everyone else is seeing as well?
    I struggle to see why simply moving a workflow from one task to another should take that on a machine that isn’t doing anything else at the time.
    (1)   
    I have a standalone (non-clustered) SharePoint box, 4 CPUs, 8 GB of memory, more than half of that available, acting as application server and wfe; only the database is on different box.
    (2)   
    The CPU only goes up to 18 or 19%, so CPU does not seem to be the bottleneck. Half the RAM is also still free.
    (3)   
    The workflow is designed with Nintex, and has about 9 flexi and review tasks – the last 2 of them in a loop iterating over typically 3 or 4 items.
    (4)   
    Looking at the logs it looks like the processing in Nintex only takes about 1 second – I don’t know where the other 3 seconds are going.
    (5)   
    There is nothing obvious in the logs.
    (6)   
    We’ve looked at all the “theoretical” improvements around throttling and batch sizes etc. – none of them appeared make any difference. And the workflow is so small that it looks like my tasks gets executed straight away. The problem appears
    to be that the execution takes too long(?) and therefore has not finished by the time the page get redrawn.
    (7)   
    I am running perfmon and I can e.g. see one(!) workflow being loaded into memory – as expected as I am the only user.
    (8)   
    I am seeing a total of 3(?) SQL queries being executed(?). I get the Bytes Sent/sec spiking at 25K, and Bytes received at 18K. But is this good or bad or a bottleneck?
    Where do I take it from here?
    I have been told that “[…] most customers have no issue with this as they are used to the way SP operates and it can be slow at times.” Is it really that bad?
    If it is worth watching more performance counters then I’d need to know what to compare them to.
    Is there something else I am missing?
    Thanks
    Martin

    Hi,
    Before considering an additional hardware try to change following configurations for workflow:
    Increase Throttle Size
    Increase Batch Size
    Time Out
    Workflow Timer Interval
    AutoCleanUpDays
    Increase Throttle Size
    The Workflow throttle setting controls how many Workflows can be processing at any one time on the entire server farm. By increasing the throttle it will allow the number of Workflows execution or can be initiated at a time.
    Use below PowerShell command to get the current Throttle Size:
    Get-SPFarmConfig | Select WorkflowPostponeThreshold
    Use below PowerShell command to set new Throttle Size:
    Set-SPFarmConfig -WorkflowPostponeThreshold 100
    Increase Batch Size
    This is the size that determines number of events processed for a single Workflow instance. Default value is 100, but it can be range from 1 to any number.
    Use below PowerShell command to get the current Batch Size:
    Get-SPFarmConfig | Select WorkflowBatchSize
    Use below PowerShell command to set new Batch Size:
    Set-SPFarmConfig -WorkflowBatchSize 200
    Time Out
    This decides the time out of the Workflow event. The default value is 5 and can be any integer. The time is in minute.
    Use below STSADM command to get the current Time Out value:
    stsadm -o getproperty -pn workflow-eventdelivery-timeout
    Use below STSADM command to get the current Time Out value:
    stsadm -o setproperty -pn workflow-eventdelivery-timeout -pv “15″
    Workflow Timer Interval
    This setting is applicable at Web Application level and not the farm level. The workflow timer interval specifies how often the workflow SPTimer job fires to process pending workflow tasks. This interval also represents the granularity of delay timers within
    your workflow. If a timer is set to delay for one minute, but the interval timer fires only every five minutes, the workflow delays for five minutes, not one minute.
    Use below STSADM command to get the current Workflow Timer Interval value:
    stsadm -o getproperty -pn job-workflow -url <Web Application Url>
    Use below STSADM command to get the current Workflow Timer Interval value:
    stsadm -o setproperty -pn job-workflow -pv “Every 10 minutes between 0 and 30″ -url <Web Application Url>
    Here is the url for reference :
    http://praveenkasireddy.wordpress.com/2013/06/14/workflow-due-to-heavy-load-the-latest-workflow-operation-has-been-queued-it-will-attempt-to-resume-at-a-later-time/

  • Due to heavy load, the latest workflow operation has been queued. It will attempt to resume at a later time.

    I have SharePoint 2010 Enterprise running SP1. Configuration is one SharePoint server in the farm and a SQL 2008 R2 database for the backend. Our user environment is 80 users with very little load on the SharePoint server. I have the workflow timer
    set to 1 minute.
    I have a SPD workflow that starts manually on a form library. Whenever I publish a new version of the workflow, the next time I start the workflow it takes the full minute to finish. If I click on the workflow status before it finishes, I see the message
    "Due to heavy load, the latest workflow operation has been queued. It will
    attempt to resume at a later time.". After the minute completes the workflow finishes.
    Here's the weird thing, the next time I start the workflow, it runs in a couple of seconds - almost instantly. I've tried up to 15 times after the inital publishing and everything seems to work fine on initiation.
    Well, that would be fine for me, however, I intermintantly get this heavy load message during task processes that are running inside the workflow. It's probably less than 5% of the time. It's really frustrating though so I appreciate some help. I'm look
    online and haven't found anything that describes my situation.
    Thank you in advance!

    Hi,
    Before considering an additional hardware try to change following configurations for workflow:
    Increase Throttle Size
    Increase Batch Size
    Time Out
    Workflow Timer Interval
    AutoCleanUpDays
    Increase Throttle Size
    The Workflow throttle setting controls how many Workflows can be processing at any one time on the entire server farm. By increasing the throttle it will allow the number of Workflows execution or can be initiated at a time.
    Use below PowerShell command to get the current Throttle Size:
    Get-SPFarmConfig |
    Select WorkflowPostponeThreshold
    Use below PowerShell command to set new Throttle Size:
    Set-SPFarmConfig -WorkflowPostponeThreshold
    100
    Increase Batch Size
    This is the size that determines number of events processed for a single Workflow instance. Default value is 100, but it can be range from 1 to any number.
    Use below PowerShell command to get the current Batch Size:
    Get-SPFarmConfig |
    Select WorkflowBatchSize
    Use below PowerShell command to set new Batch Size:
    Set-SPFarmConfig -WorkflowBatchSize
    200
    Time Out
    This decides the time out of the Workflow event. The default value is 5 and can be any integer. The time is in minute.
    Use below STSADM command to get the current Time Out value:
    stsadm -o getproperty -pn workflow-eventdelivery-timeout
    Use below STSADM command to get the current Time Out value:
    stsadm -o setproperty -pn workflow-eventdelivery-timeout -pv “15″
    Workflow Timer Interval
    This setting is applicable at Web Application level and not the farm level. The workflow timer interval specifies how often the workflow SPTimer job fires to process pending workflow tasks. This interval also represents the granularity of delay timers within
    your workflow. If a timer is set to delay for one minute, but the interval timer fires only every five minutes, the workflow delays for five minutes, not one minute.
    Use below STSADM command to get the current Workflow Timer Interval value:
    stsadm -o getproperty -pn job-workflow -url <Web Application Url>
    Use below STSADM command to get the current Workflow Timer Interval value:
    stsadm -o setproperty -pn job-workflow -pv “Every 10 minutes between 0 and 30″ -url <Web Application Url>
    Here is the url for reference :
    http://praveenkasireddy.wordpress.com/2013/06/14/workflow-due-to-heavy-load-the-latest-workflow-operation-has-been-queued-it-will-attempt-to-resume-at-a-later-time/

Maybe you are looking for

  • Java.util.zip.ZIPException

    We are using Oracle Application Server 10g (10.1.2) with AIX OS version 5.3 release 6. We are getting error while deploying a "*.war" file. Below is the full error we have got during the installation. Error starting from below. Failed to deploy web a

  • HT201320 How do I change the number of email messages I can view in the new iOS.

    I have the new IOS on my phone and can't find the setting that allows me to change the number of email messages I can view. Anyone know?

  • Max Steps Excuted

    On CCX 8, I have a script that presents the caller with an option to schedule a callback.  This initates a separate script which request the caller enters a desire number for the call back and to leave a message associated with the call back. (pretty

  • After updating iphone 5c to ios 8.1.3 goes into recovery mode

    the problem is that if i restore it like its trying to suggest me i will lose all my apps, photos, chats HELP! if you are wondering this was a OTA update

  • Are the new mac i7s 64-bit

    what im worried about is will they support 64 bit applications, like the soon to be released adobe cs5.