Start Workflow from transaction

Hi ,
Please let me know, where can i subscribe my custom workflow to trigger the workflow if we want to start the workflow manually from transaction FV60.
Thanks in advance
Sarath

Hi
I am not very much sure about how the txn FV60 look and feel would be , but the solution to your answer is already in your post, Assuming that there would not be any kind of button on the application tool bar of the standard txn FV60, you might have customized it, in sucha  way that you could include the button START WORKFLOW on application tool bar.
   As per your requirement you want to initiate the workflow only in case when the end user clicks on the START WORKFLOW button, In that case I think by using the Module pool programming you can actually resolve the requirement. By just simply validating the SY-UCOMM , if the fcode is equal to the FCODE of START WORKFLOW button, then by using either SAP_WAPI_CREATE_EVENT or SAP_WAPI_START_WORKFLOW. You can start manually.
Instead of implementing some Badi's or User Exits..
Regards
Pavan

Similar Messages

  • Starting Workflow from Generic Object Services

    Hi All.
    We are on ECC6. In transaction MM02 when I excute 'Start Workflow' from Generic Object Services, no workflows are found. Can anyone help me with the following issues;
    1. What is the underlying object in transaction MM02 (I believe it is BUS1001006)
    2. How can i ensure that the proper workflows in this transcation are started through some  
        customisation, enhencement or user-exit.
    Regards.

    I think you have to maintain the Workflow Template as General Task and then only it will appear in the GOS.
    Thanks
    Arghadip

  • Start Workflow from particular Step and assign to particular group of members

    Hi
    We are working on workflow using CQ 5.5.
    Is it possible start workflow from particular Step and assign this workflow to particular group of members dynamically(Using Process Step).
    Workflow Name : Single Page Workflow
                        Start
                            |
                        Step 1
                            |
                        Step 2
                            |
                        Step 3
                            |
                        Step 4
                            |
                        Step 5
                            |
                        Step 6 (Process Step)
                            |
                         End
    In Step 6 , we will start workflow for list pages dynamically , for that we written code as
    public class PublishTranslation implements WorkflowProcess{
        public void execute(WorkItem item, WorkflowSession wfsession, MetaDataMap metadata)
                throws WorkflowException {
               WorkflowModel  model = wfsession.getModel(item.getWorkflow().getWorkflowModel().getId());
               WorkflowData wfdata= wfsession.newWorkflowData("JCR_PATH",pagePath[i]);
               wfsession.startWorkflow(model, wfdata);
    This code starting workflow from step 1.
    I need help on
    1. How can i start workflow from step 2 or 3 ?
    2. How can i assign this workflow to group members ?
    Thanks & Regards

    Hello Ravindra,
    Logically it shouldn't allow you to do that and same happening because start workflow call on model will always trigger the workflow from starting point (means the very first step after start component in workflow design)
    To achieve this you have other ways, i would suggest to try below if it works for you.
    1. Instead of creating a new workflow just branch it programmaticaly and route back to previous step
          List<Route> routes=wfsession.getBackRoutes(item);
                     Route route=routes.get(WHAT_EVER_STEP);
                     wfsession.complete(item, route);
    2. Create a new workflow model which starts from second step and using code get access of that workflow
         wfsession.getAllWorkflows();
    for delegation as mentioned by Yogesh, you can try wfsession.delegateWorkItem(WorkItem item, Authorizable participant)
    Thanks,
    Pawan

  • Start Workflow from the After startup database trigger

    Hallo,
    I try to startup a workflow process from a database trigger :
    the after startup database trigger. But when I do this, he
    doesn't startup. When I add a commit-statement after the call
    to startup the workflow, my database never gets open.
    What do I have to do ? And what command is used ?
    Thanks a lot.
    Filip Huysmans.

    See the Posting: Starting Workflows From a Database Trigger
    Hallo,
    I try to startup a workflow process from a database trigger :
    the after startup database trigger. But when I do this, he
    doesn't startup. When I add a commit-statement after the call
    to startup the workflow, my database never gets open.
    What do I have to do ? And what command is used ?
    Thanks a lot.
    Filip Huysmans.

  • Can not start workflow from Servr OM code

    Hello all ,
    i want to start sharepoint 2013 workflow when a list item is updated based on some condition.
    i have writen bellow code
    var workflowServiceManager = new WorkflowServicesManager(web);
                    var workflowSubscriptionService = workflowServiceManager.GetWorkflowSubscriptionService();
                    //get all workflows associated with the list
                    //get lsit
                    SPList list = web.Lists["Leave"];
                    if (list != null)
                        var subscriptions = workflowSubscriptionService.EnumerateSubscriptionsByList(list.ID);
                        //run all workflows associated with the list
                        SPListItem item = list.GetItemById(Convert.ToInt32(drpRequest.SelectedValue));
                        foreach (var workflowSubscription in subscriptions)
                            //initiation parameters 
                            var inputParameters = new Dictionary<string, object>();
                            //inputParameters.Add("List", leaveList.ID);
                            workflowServiceManager.GetWorkflowInstanceService().StartWorkflowOnListItem(workflowSubscription, item.ID, inputParameters);
    on the last line it throws unauthorised access exception .
    while current user have owner permissions.
    here is error .
    i have run full profile sync and user is availiable in UPS.
    Please Help
    Mukesh

    Hello  all,
    After running full profile sync i am able to deploy workflow.
    it is running
    but how can i elevate privilege to start workflow.
    from code
    Mukesh

  • Starting workflow from messages

    Hi,
    I am trying out the possibility of starting workflows when a message is raised (Error/Warning). Once i create the message to workflow linkage i am able to start the workflow from the message long text.
    In this scenario is there a way to start the workflow automatically whenever that particular error message occurs?
    For example consider transaction PA30. Now if i try to enter a character value in place of personnel number i get an error message "Enter a Numeric Value". Now once i link the workflow to the message i am able to start the workflow manually. But can this be done automatically on the occurence of this message?
    Thanks,
    Prasath N

    Hi Karun,
    Thanks for your response. I have done this already and it is workfing fine when i start the workflow manually. I would like to know if there is an option to start the workflow <b>automatically (without pressing the workflow button)</b> when the message is raised.
    Thanks,
    Prasath N

  • Starting Workflow from VA02/03 Problem

    Hi,
    I have a problem, I want to start the workflow in VA03 Transaction, from menu "Service Object"==>" Workflow"==>"Start Workflow", but I can't see the workflow I want to start, the window is empty, this does not happen in our Quality an Production System, I can see it there in VA03 and in SWUI transaction, but in our Development System is not possible to see it, is there any configuration missing or some tasks thet need to be performed to see the workflow to start it manually from VA02 & VA03 Transactions??.
    Best Regards,
    Moisés.

    Hi Moisés,
    If you want a workflow to be triggered via GOS then it must be in the Start Workflow list in transaction SWUI and in order for it to be in the list it must not have an mandatory import elements and you must also be a possible agent (Set the agent assignment of the workflow template to General). Can you make sure the above 2 conditions are met and then test.
    Regards,
    Eddie

  • Error while starting workflow from warning msg or error msg?

    Hello experts,
    I m tryin to start and workflow from error msg of ME21...whn we juss click enter without entering any value, it gives error as -" enter Purch org  ". whose msg class - ME and msg num - 083.
    thn from t-code SWUY,i creating and linked workflow for the msg.
    Now while testing,when m goin to t-code ME21, and goin to the long text of tht error msg.....the button to start workflow is not getttin enabled. tht is still disable.
    PLease tell r thr any other back ground settings to be done for this.
    Regards
    Nitin

    Hi,
    Your workflow landed up in Error and you want to Restart it right.
    Go to SWPR and check that workflow is there.
    If found, select it and Restart it.
    Regards,
    Surjith

  • Starting Workflow from Generic Object Services in IQS1 Transaction

    Hi All,
    My requirement is users will create the notification through IQS1 and they will attach the Adobe document through Generic Object service. In the notification Task, they will assign the repsonsible person for that form. Once they released the notification, i need to send a mail to the responsible person. I got the BO (BUS7051) . I created the custom WF and acitivated the BO & WF link. When i selected the Workflow Overview in the Generic Object Serivce, it is saying 'There are no workflows that have already worked with this object'. But when i checked the is worklow log in SWIA, my workflow got triggered.
    I would like to know why it was not showing when i selected the same in Generic Object Serivce. How to trigger Workflow throuhg Generic Object Service.
    Any info relevant to this, please share with me..
    regards,
    sasi

    Hi,
    For generic object services to find the workflow, the object must be attached to the workitem/workflow or used in the container.
    If the object is correctly used in the workflow, it will be visible via GOS.
    How did you use the object in the workflow?
    Jeroen.

  • Starting workflow from where ?

    hi,
    is it possible to start a workflow 'behind' a transaction code ?
    i want to have a menu-entry in user-menu in ERP where the user can click on
    a self-written workflow. but how can i give them the possibility to enter this workflow ?
    reg, Martin

    REPORT  YGERTEST_START_WF.
    data: gw_task type SWW_TASK,
          gw_wf_id type SWW_WIID,
          gw_wi_id type SWW_WIID,
          gw_return_code type sysubrc,
          gw_status type SWR_WISTAT,
          gt_message_lines type STANDARD TABLE OF SWR_MESSAG,
          gw_message_line type SWR_MESSAG.
    start-of-selection.
      CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
        EXPORTING
          task                      = 'WS94400047'
    *     LANGUAGE                  = SY-LANGU
    *     DO_COMMIT                 = 'X'
    *     USER                      = SY-UNAME
    *     START_ASYNCHRONOUS        = ' '
    *     DESIRED_START_DATE        =
    *     DESIRED_START_TIME        =
    *     DESIRED_START_ZONLO       = SY-ZONLO
    *     IFS_XML_CONTAINER         =
        IMPORTING
          RETURN_CODE               = gw_return_code
          WORKITEM_ID               = gw_wf_id
          NEW_STATUS                = gw_status
        TABLES
    *     INPUT_CONTAINER           =
          MESSAGE_LINES             = gt_message_lines
    *     MESSAGE_STRUCT            =
    *     AGENTS                    =
    write: / 'Return code from start: ', gw_return_code,
           / 'WF ID: ', gw_wf_id.
    loop at gt_message_lines into gw_message_line.
      write: / gw_message_line.
    endloop.
    write: / 'New status: ', gw_status.
    select max( wi_id )
           into gw_wi_id
           from swwwihead
          where top_wi_id eq gw_wf_id.
    CALL FUNCTION 'SAP_WAPI_EXECUTE_WORKITEM'
      EXPORTING
        workitem_id          = gw_wi_id
    *   LANGUAGE             = SY-LANGU
      IMPORTING
        NEW_STATUS           = gw_status
        RETURN_CODE          = gw_return_code
      TABLES
        MESSAGE_LINES        = gt_message_lines
    *   MESSAGE_STRUCT       =
    write: / 'Return code from execute: ', gw_return_code,
           / 'WI ID: ', gw_wi_id.
    loop at gt_message_lines into gw_message_line.
      write: / gw_message_line.
    endloop.
    write: / 'New status: ', gw_status.
    Works like a charm. You could enhance the selection on SWWWIHEAD with the type of task you expect and even wait for it to exist if it's not the first step in the workflow.
    Good luck,
    Gert.

  • How to check for errors in starting workflow from plsql?

    Hi All,
    I am using the below code to start a custom workflow.
    DECLARE
    l_itemtype VARCHAR2(30) := 'XXPWA';
    l_itemkey  VARCHAR2(30) := '1116410C';
    error_code VARCHAR2(2000);
    error_msg  VARCHAR2(2000);
    BEGIN
        wf_engine.createprocess(l_itemtype, l_itemkey, 'XX_WEBADI_APPROVAL');
        wf_engine.setitemuserkey(itemtype => l_itemtype
                                ,itemkey  => l_itemkey
                                ,userkey  => 'USERKEY: ' || '1116410C');
        wf_engine.setitemowner(itemtype => l_itemtype
                              ,itemkey  => l_itemkey
                              ,owner    => 'SYSADMIN');
        wf_engine.setitemattrnumber(itemtype => l_itemtype
                                   ,itemkey  => l_itemkey
                                   ,aname    => 'BATCH_ID'
                                   ,avalue   => 1116410);
        wf_engine.startprocess(l_itemtype, l_itemkey);
    EXCEPTION
    WHEN OTHERS THEN
    error_code := SQLCODE;
    error_msg  := SQLERRM(SQLCODE);
    dbms_output.put_line(error_code||error_msg);
    END ;
    The script completes successfully without errors.
    I am sending a notification from this workflow. I can see the records getting created in tables like WF_NOTIFICATIONS and WF_ITEM_ATTRIBUTE_VALUES. But i cannot see any thing if i query from Status Monitor. Also I am not getting the said notifications. How can i find what is the issue?

    Hi Manu,
    Thanks for sharing the information, If you think of speeding up finding were exactly your notification is struck, You can use the below query (Input parameter would be your notification id), Hope this information is good, I liked this very much, the way it was narrated.
    SELECT n.begin_date,
           n.status,
           n.mail_status,
           n.recipient_role,
           de.def_enq_time,
           de.def_deq_time,
           de.def_state,
           ou.out_enq_time,
           ou.out_deq_time,
           ou.out_state
      FROM applsys.wf_notifications n,
           (SELECT d.enq_time def_enq_time,
                   d.deq_time def_deq_time,
                   TO_NUMBER((SELECT VALUE
                               FROM TABLE(d.user_data.parameter_list)
                              WHERE NAME = 'NOTIFICATION_ID')) d_notification_id,
                   msg_state def_state
              FROM applsys.aq$wf_deferred d
             WHERE d.corr_id = 'APPS:oracle.apps.wf.notification.send') de,
           (SELECT o.deq_time out_deq_time,
                   o.enq_time out_enq_time,
                   TO_NUMBER((SELECT str_value
                               FROM TABLE(o.user_data.header.properties)
                              WHERE NAME = 'NOTIFICATION_ID')) o_notification_id,
                   msg_state out_state
              FROM applsys.aq$wf_notification_out o) ou
    WHERE n.notification_id = &NOTIFICATION_ID
       AND n.notification_id = de.d_notification_id(+)
       AND n.notification_id = ou.o_notification_id(+)
    This single query links all together and shows you the current state of the message.
    Column 5 & 6 shows the enqueue & dequeue time of WF_DEFFERRED queue.
    Column 7 shows the message status in WF_DEFFERRED
    Column 8 &  9 shows the enqueue & dequeue time of WF_NOTIFICATIONS_OUT queue.
    Column 10 shows the message status in WF_NOTIFICATION_OUT.
    Below is the sequence of activities going on between the PL/SQL trigger of the business event and the e-mail received from notification mailer in the tail -end
    1. EBS user sends email – To send an email EBS modules use standard API. Email API is implemented in PL/SQL package WF_NOTIFICATION (I will cover it in the next article).
    1.1. Provides application data – First of all user’s session inserts business data (recipient, message type, message text etc.) into WF_NOTIFICATIONS table (do not mix up with PL/SQL package mentioned above);
    1.2. Defers processing Generates event – a user or process leaves EBS to run further email processing steps. It is done using a Business Events System (BES). Session raises an event k“oracle.apps.wf.notification.send” via the WF_EVENT PL/SQL package (BES processing to be covered in the next articles). Each deferred event is put in one of the two Advanced Queues WF_DEFERRED or WF_JAVA_DEFERRED for further processing. All email sending events go through the WF_DEFERRED queue.
    2. Deferred Agent Listener – is a process responsible for ALL BES events processing. It executes all deferred events calling subscriptions’ functions defined for each business event. There are several more things to explain about Agent Listeners and subscription processing (e.g. there are several differed agents, subscriptions groups etc.) This is one more subject for further articles.
    2.1. Reads event and starts subscriptions processing – Strictly speaking there is no any enabled subscription for the “oracle.apps.wf.notification.send” event (submitted during the first step). This event is a part of “oracle.apps.wf.notification.send.group” event group. The Deferred Agent executes subscriptions for that group rather than for the stand alone event. At this stage the Agent knows that it should process the notification with given notification id (it is a part of the event data passed via the event).
    2.2. Reads application data – in order to generate the email/notification the Agent reads business data from the WF_NOTIFICATIONS table and a few related tables and during the next step builds up the email’s text in XML format.
    2.3. Generates data for outbound interface – This is the last step executed by the Deferred Agent Listener. It generates XML representation of email to be sent and together with other important bits of information posts it to the Notification Mailer outbound queue WF_NOTIFICATION_OUT.
    3. Notification Mailer – As you see it was a long journey even before we started to talk about the Notification Mailer. There are a lot of things which may go wrong and this is why it is important to know the whole flow of the events to troubleshoot the mail sending functionality in EBS. We’ve come to the last processing step before the message leaves EBS boundaries.
    3.1. Reads message – the Notification Mailer dequeues messages fromWF_NOTIFICATION_OUT queue on regular basis. In fact this is the only place where it looks for the new messages to be sent. This means if a notification doesn’t has a corresponding event ready for dequeuing in the WF_NOTIFICATION_OUT queue it will never be send. As soon as a new message arrives Notification Mailer dequeues it and gets prepared for sending;
    3.2. Sends email via SMTP – This is the step when the message leaves EBS. The Notification Mailer sends the email using text retrieved from the advanced queue during previous step;
    3.3. Updates status – as the last step in the notification sending process the Notification Mailer updates a MAIL_STATUS column in WF_NOTIFICATION table.

  • Start workflow from DAM-folder

    Hi,
    is it possible to declare a workflow model so that it is possible to start it by selecting the folder in the DAM rather than the DamAssets?
    The case is that we would like to add properties to all assets in the selected folder, a variant of the Bulk Edit.

    We have a component that does this kind of things today, but would like to push the functionality to a workflow that is startable from the DAM or WCM. The usecase is this (using Geometrixx):
    Open the DAM
    Browse to the Geometrixx-folder  (http://localhost:4502/damadmin#/content/dam/geometrixx)
    Right-click on "Banners"
    Select "Workflow" and then Select what workflow to start.
    It is at step 4 I get stuck. There I can't get the "Workflow" to be enabled.
    Another variant is if we can set the tag on the folder an have it inherited by all sub-assets?

  • Starting Workflow from Record

    Dear all,excuse me for my english.
    1) I want to create workflow with
    record.For doing this i'm creating service provider for workflow
    and use standart function to start wf.
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/057 03a1ff16f68e1
    0000000a11402f/content.htm
    For this function programm send input container , that must
    include parameters:
    - RECORD Business object RECORD.
    - AKTID: ID of the record
    - ACTCL: Document class of the record
    - RMSID: RMS ID of the RMS in which the record was
    created.
    - AKTSPSID: Element type of the record
    - FIRSTAGENT: "US" + current user name
    - AKTLOGSYS: RFC destination of the system in which
    Records
    But in debug mode i can see only last 4.What i must do for
    programm sends also record,aktid, actcl?
    2)When adding a document to case we may execute method create, but in this method we need that BO reading elements from container.
    How i can solve this problem?
    Help me plz, thanks.

    You have created your own function module to start the workflow, is that correct? The obvious question then is: How do you set up the container to pass parameters to the workflow? This isn't done with customizing when you create your own function module, it is done with ABAP coding.
    There are (at least) two possibilities for passing a BOR object instance to a workflow. The simple one is to raise an event for the object, then the BOR object will be found as the event object and can be bound from the triggering event. Another possibility is to fill the container manually. That means you must create the object ID (persistent object reference). Typically you will use the macros available in <cntn01> to create this object reference. Then you must put this object ID in the container with the correct element name, i.e. the name you find in the workflow definition.
    <i>PS: When you put a URL in here, use the URL option to hide the address so the link works. Your URL contained two spaces and didn't work immediately. When pasting into Firefox the spaces in the URL were converted to underscores, so at the URL is technically valid, but the page is not found.</i>

  • Starting workflow from WB (java)

    Hi there WD guru's,
    I am new on Web Dynpro (WD) and i do have some questions. What i have to realise is when the WD fields are filled in and the user pushed the "submit" button there need to be a workflow started in R/3.
    What i have in mind is this:
    1. Create a model in WD for SAP_WAPI_START_WORKFLOW
    When i import this BAPI there is a yellow triangle in front of the BAPI. I think that it is a warning, but i do not know for sure. Hope somebody can tell me?  Is this SAP_WAPI_START_WORKFLOW the correct way? What you need to know is that we don't want that the data is first saved in R/3 before it is approved.
    2. In the <b>DoInit()</b> fase of the Component Controller i want to create a new element of the SAP_WAPI_START_WORKFLOW_INPUT. This works fine. But when i create a new element of the INPUT_CONTAINER it goes wrong. As far is i understand, the input_container is a multi line structure. Can someone tell me if it's possible to fill the structure with the correct data? If there is a alternative, pls let me know.
    The code looks like this:
    // Create a new element in the Sap_Wapi_Start_Workflow_Input node
    Sap_Wapi_Start_workflow_Input input = new Sap_Wapi_Start_workflow_Input();
    // Create new elements in the Input_Container node
    input.setInput_container(new Swr_Cont()); [here it goes wrong]
    wdContext.nodeSap_Wapi_Start_Workflow().bind(input);
    I hope i described it well enough. If there are questions, pls let me know.
    Thx in advance
    Regards,
    Maarten

    Hi Mukesh,
    Thx for the answer, hope you (or somebody else) can help me i little bit more.
    When i try,
    input.setInput_Container("Param value");
    It is not working. The setInput_Container(); is of type AbstractList arg0. Can somebody tell me how to fill this input container.
    The input container has 2 fields ELEMENT and VALUE. I need to submit more lines in the input container.
    Thx in advance.
    Regards, Maarten.

  • How to start workflow from a form?

    Hi,
    does anybody know, how to start a task after a form is submitted so the form data is passed to the task? I do not want to use "task start forms" since I want to use the same form definition for several purposes, and IdM does not allow me to use FormRef directive for the purpose.
    Regards,
    Vladimir

    HI Santos.
    I tried using the code : <Property name='postURL' value='user/processLaunch.jsp?id=Name_of_Workflow&op_flag=true&op_enduserId=$(enduserId)/>
    But, it gave me an error : *"the reference to op_flag must end with the delimiter ';' "*
    Thanks

Maybe you are looking for

  • Multibyte issue in Oracle Database Link

    Hi Gurus, Greetings!!! I need to transfer data from Microsoft SQL Server 2005 to Oracle DAtabase 10g. I achieved it using Heterogeneous Connectivity. I can now issue queries but unfortunately i got an issue in displaying multibyte characters. I thoug

  • 405 error loading a php file using fastCGI

    I'll start off by admitting I'm brand new to JWS. I really appreciate anyone willing to help with this configuration: GOAL: Install the PHP Engine as a FastCGI Server http://developers.sun.com/webtier/reference/techart/php2.html#4 I've read a lot of

  • REP-56092 WHEN RUN REPORT IN WEB LAYOUT

    I have installed report 9iDS and can run report in paper layout without any problem. However , when I press "Run Web Layout" button , I get message rep-56092 NO CLASS DEFINED FOR DESTINATION TYPE SCREEN WHEN RUN WEBLAYOUT. Do anybody has idea why thi

  • Can HA-Oracle agent distinguish a failed database from an inactive one?

    I read "Oracle and Sun Cluster:A technical Overview" by Joseph Bianco. It says "The HA-Oracle agent can distinguish a failed database from an inactive one". How do we configure HA-Oracle agent to be smart enough to distinguish normal shutdown (due to

  • Another iBook question

    OK, I am in the process of getting ahold of a white 500mhz G3 iBook. Does anyone know.. will the power adapter from a 300mhz clamshell work with the 500mhz white model? Are they interchangeable? On the back of the charger his is the information it li