How to start a workflow by an event

Did somebody know how to start an OWB workflow after an event occur ?
In my application, the OWB workflow must start (and import data) after a record is insert in one of my application database table. Actually, I schedule a job to look in that table every single minute. The problem is that every minute, a connection is open and close on the application database. Also, the user have to wait for one minute (at most) before is job begin to be process. Can someone have a way to start OWB on event by using trigger, queue or something else ?
Thank you,
MB

owf(your_OWF).wf_engine.LaunchProcess(item_type, item_key, process_name);
If your process is defined as:
Module: PRC_MODULE
Process_flow_package: PRC_PACK
Process_name: PROCESS
then ITEM_TYPE is PRC_PACK,
ITEM_KEY can be anything, like p_process_name||'_'|| SYSDATE to make sure it does not get doubled,
and process_name is PROCESS.
So when you call this function it would look like this:
owf(your_OWF).wf_engine.LaunchProcess('PRC_PACK', 'PROCESS_24072009120000', 'PROCESS');

Similar Messages

  • How can i trigger workflow when particular event happens in webdynpro

    how can i trigger workflow when particular event happens in webdynpro

    hi,
    To trigger workflow , use the fm : 'SAP_WAPI_START_WORKFLOW'
    Refer this thread for similar requirment : Workflow in WebDynpro
    Blog : http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417500)ID1564403950DB00699140435432809306End?blog=/pub/wlg/2778

  • How to start a Workflow with a Dynpro action button.

    Hi @ all,
    i have the problem, that i want to start a workflow with a self-made dynpro.
    The dynpro consist the following information who had to be transported in the workflow.
    Stacknr.
    User
    Date
    Time
    and a tif data file
    Somebody have an idea how it works?
    i am very new in workflow. So if you want to help me than please with a step by step guide.
    Thanks a lot.
    Regards Phil

    Hi,
    Please go through the wiki. There are plenty of instructions. Also, this is commonly discussed topic, so try to search first. The key for your problem is that there are function modules to tirgger workflows (either directly or with an event).
    Regards,
    Karri

  • How to start a workflow when a value in specific column is changed?

    HI !! 
    I would like that  my workflow will run only if a value on a specific colunm will change.
    is there a way to do it without using a third colunm ?
    thank you !
    nikita.

    Hi,
    According to your post, my understanding is that you wanted to start a workflow when a value in specific column is changed.
    When you create workflow, if you check the “start the workflow automatically when an item is changed”, the workflow will be started automatically once the item is edited.
    In the other word, no matter which column we changed, the the workflow will be started automatically.
    As a workaround, we can add condition or action to make the workflow excute the next step only if the value in specific column is changed.
    There are two options to achieve it.
    Use the “Wait for Field Change in Current Item" action”. If you add the action at the first,  the workflow will excute the next step until the column is chaned to the specific value.
       2. User the “If any value equals to value” condition. If you add the condition at the first, the workflow will excute the next step if the condition is satisfied.
    Thank you for your understanding.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How to start a Workflow automatically

    Hello Friends,
    I'm new to SharePoint Designer and facing some challenges to do it. Please help me on this.
    My requirement is to send an automated email notification to an user when a specific document is created/modified in a particular folder. The document will come to SharePoint through emails (NOT by manual upload).
    Remember: This workflow works fine when we upload the document manually to the folder. But If I send the document to the SharePoint through an email (I've enabled "incoming email" setting for the folder. So that people can sent
    the document to the SharePoint) the workflow is NOT triggering.
    Below are the steps I followed
    1. I've created a list workflow and selected the folder name where the document will be saved. Let's say "File Received" is the folder name in my SharePoint and "Test File.docx" is the file that will
    saved in this folder.
    2. In the condition I wrote if current item Name contains "Test File" and in action I've created an email task
    3. and finally in start option I've checked start workflow automatically when an item is created/modified.
    This workflow is working perfectly when someone upload the document (i.e. Test File.docx). But when someone sent the same document though an email to this SharePoint, the document is saved in SP but the workflow is not triggering. 
    Any suggestion/help is really appreciable.
    version: SPD 2010
    Thanks! -Sandip

    Hi Sandeep,
    Please check this article for step by step implementation
    http://social.technet.microsoft.com/wiki/contents/articles/4607.sharepoint-2010-workflows-on-incoming-emails-in-sharepoint-documents-library.aspx
    http://sharepoint.stackexchange.com/questions/6713/how-can-i-make-a-workflow-automatically-start-when-an-email-is-received
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • How to start a workflow if a document status changes ?

    Hello,
    I want to start a wrokflow when the status of a document changes to completed. Can anyone point out the steps that i should follow ?
    What customization steps are required for this issue.
    For the record, i did the following:
    - i created the notification for absence workflow described in the SAP help documentation
    - Then i went to spro transaction code -> cross-application components-> doc. Mngt ->control data -> define document type. then i chose KPR type, when to its status "completed" modified it and added in the task the id of a workflow and i saved.
    Now when i change the status of a document to complted nothing happens.
    The workflow is not triggered.
    Any ideas to why ?
    Points are rewarded
    Regards

    Hi,
        Go to transaction " BSVW " and make an entry for your status object and business object type. You can maintain status restrictions for your object type too in this transaction.
        This will trigger the workflow.
    Regards,
    Manikandan R

  • How to start work flow agent listener and work flow background engines R12

    Hi,
    I need to start work flow agent listener and workflow background engine in R12.1.3. Could you please specify how to start a workflow agent listener and workflow agent background engine.
    Please send me link if any documents are there .
    Best Regards,
    Anil

    I need to start work flow agent listener and workflow background engine in R12.1.3. Could you please specify how to start a workflow agent listener and workflow agent background engine. How to start the Workflow Deferred Agent Listener andWorkflow Java Deferred Agent Listener? [ID 548918.1]
    Please send me link if any documents are there . Please search the forum before posting similar questions.
    http://forums.oracle.com/forums/search.jspa?threadID=&q=How+to+start+Workflow+Agent+Listener&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    http://forums.oracle.com/forums/search.jspa?threadID=&q=How+to+start+Workflow+Background+process&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • Starting a workflow for a PCR form

    Hello,
    We installed the MSS business package. I would like to know how to start a workflow for a PCR form (example: Request for Promotion). The workflow just needs to be simple one step approval from manager.
    What configs are needed in SPRO or elsewhere?
    Thanks,
    Rob.

    HI,
    You can use transaction QISRSCENARIO for that and the IMG path is below -->
    Cross Application Components>Internet/Intranet Services>Internal serive request--> Define Scenarios.
    Now Select the scenario and then click the display button.If you are using JSP in frontend then click the additonal data for scenario. Here you will find the WF.
    Or you can call the WF in your custom program also.
    Thanks & Regards,
    Sandip Biswas

  • InfoPath 2013 start a workflow

    In a new InfoPath 2013 form that uses a custom list, I would like to add a custom button and/or something to click on for the user to eventually 'start a workflow when item changes'.
    Right now since I am in the early phase of the process, and it would be fine to 'start the process manually' also. Basically I would like directions on what a user can click to they could start the workflow.
    I found the following link and it shows how to start a workflow from the documents library:
    https://www.youtube.com/watch?v=afttEV61kQI
    I would like to know how to have this same process occur from an InfoPath 2013 form where the user clicks my 'button/item' and does not click on the 'auto generated' save button.

    assuming that the workflow should not necessarily start ANY time ANY file changes (which is a default option, and requires no custom dev effort)... what I've seen a few times, is for the form to include a checkbox ("start workflow")... the workflow
    starts, and checks for the condition... and stops if the checkbox is not checked.
    Scott Brickey
    MCTS, MCPD, MCITP
    www.sbrickey.com
    Strategic Data Systems - for all your SharePoint needs

  • Periodical start of workflow selecting all records

    Hi,
    We want to periodical start a workflow. This workflow should be run for all records of the repository.
    How to select all records?
    How to start a workflow periodically?
    can anyone help me?

    Hello H. Antonise
    First of all
    Not recommend use that for all records in your repository or for many records
    Second of all
    for autolaunch workflow sap mdm have many conditions
    Of course you can use MDM API (Java) for workflow management - that is simple way if you know JAVA programming language
    and more hard way if you wolud like it without programming:
    1) add tech field in repository
    2) create your workflow and set
    trigger action: record update
    active : yes
    Max Records:0
    autolaunch : Immediate
    once in time interval wich you set in mds.ini file workflow will be launch(by default every 5 minutes)
    3)create file for import some value to that field for all records
    (remember about my warning!!!)
    4) configure mdis for automatic import that file
    5) configure some task manager - it should to put your source file once a day to your inbound directory(use standard task manager for windows or "Cron" for Unix-like systems or some another program)
    each another way the same just:
    in point 3
    Import Manager options set Checkout/Workflow =[your workflowname]
    in that  case after import your workflow will be start immediatly for all updated records
    more about how it work you can founf in standard documentation :
    http://help.sap.com/saphelp_nwmdm71/helpdata/en/4b/72b8e7a42301bae10000000a42189b/MDMImportManager71.pdf
    http://help.sap.com/saphelp_nwmdm71/helpdata/en/4b/72b8aaa42301bae10000000a42189b/MDMDataManager71.pdf
    Regards
    Kanstantsin Chernichenka

  • Can't start a 2013 Workflow in an Event Receiver

    I am trying to run a SP2013 workflow from an Event Receiver but I get the error "The request was aborted: The request was canceled. Client ActivityId: aec2fc1b-3f33-44d8-85ab-c6c976617b8c" at the point I actually attempt to start the Workflow.
    The scenario is  as follows. I have 2 lists: List A and List B. Users have permissions to create items in List A but not List B. When users create a new item in List A, a SP2013 workflow runs which then creates a new item in List B. List B should then
    run another SP2103 Workflow but because of how SP and workflows work, this second workflow on List B doesn't automatically run. Thus I have created an Item Added Event Receiver on List B that will run the required workflow automatically (at least it should
    if it worked!)
    I'm sure the problem must be something to do with permissions but nothing I try seems to solve it:
    I can't just use the account of the user triggering the event as this user will be the person adding items to List A and they don't have permissions to do anything in List B (thus they cannot see items in list B or start workflows)
    I can't run using RunWithElevatedPrivileges as a) I don't think this works well with Event Receivers and b) SP2103 workflows cannot be run using the admin account.
    I have tried impersonation with an account specifically set up for running workflows (named mydomain\wssworkflow). This account has full control of the entire site, lists etc. but it still gives the error mentioned above. My code is shown below - the error
    occurs on the line: 
    wfi.StartWorkflowOnListItem(sub, properties.ListItemId, payload);
    Any help in working out why this isn't working would be appreciated.
    Thank you,
    -Stephen
    public override void ItemAdded(SPItemEventProperties properties)
    base.ItemAdded(properties);
    var wsm = new Microsoft.SharePoint.WorkflowServices.WorkflowServicesManager(properties.Web);
    var wfss = wsm.GetWorkflowSubscriptionService();
    var subs = wfss.EnumerateSubscriptionsByList(properties.ListId);
    foreach (var sub in subs)
    if (sub.Name == "RequestAddedToListB")
    var userToken = properties.Web.EnsureUser(@"mydomain\wssworkflow").UserToken;
    using (SPSite site = new SPSite(properties.Site.ID, userToken))
    using (SPWeb web = site.OpenWeb())
    var payload = new Dictionary<string, object>();
    payload.Add("itemId", properties.ListItemId);
    payload.Add("WorkflowStart", "StartWorkflow");
    var wfi = wsm.GetWorkflowInstanceService();
    wfi.StartWorkflowOnListItem(sub, properties.ListItemId, payload);
    break;

    This is the alternate code I had using SPSecurity.RunWithElevatedPrivileges that didn't work. It gives the error 
    "Attempted to perform an unauthorized operation"
    on the line
    var subs = wfss.EnumerateSubscriptionsByList(properties.ListId);
    Thank you.
     public override void ItemAdded(SPItemEventProperties properties)
         base.ItemAdded(properties); SPSecurity.RunWithElevatedPrivileges(delegate
    var wsm = new Microsoft.SharePoint.WorkflowServices.WorkflowServicesManager(properties.Web);
    var wfss = wsm.GetWorkflowSubscriptionService();
    var subs = wfss.EnumerateSubscriptionsByList(properties.ListId);
    foreach (var sub in subs)
    if (sub.Name == "RequestAdded")
    using (SPSite site = new SPSite(properties.Site.ID))
    using (SPWeb web = site.OpenWeb())
    var payload = new Dictionary<string, object>();
    payload.Add("itemId", properties.ListItemId);
    payload.Add("WorkflowStart", "StartWorkflow");
    var wfi = wsm.GetWorkflowInstanceService();
    wfi.StartWorkflowOnListItem(sub, properties.ListItemId, payload);
    break;

  • How to avoid starting of workflow ?

    hi there,
    i have a problem:
    on BO BUS2089 (Travel) i have a event 'CREATED'
    on that event i have a workflow. everytime the event is raised the workflow starts. so far so good, BUT:
    i ONLY want to start the workflow when the travel-request is created in portal (ESS).
    But there is a direct way in backup where traveling-requests are entered by administration.
    how can i handle this to avoid starting the workflow when it is done in backend system (HR) ?
    reg, Martin

    Martin,
    You should be able to identify the program that is triggering the event. Take a look into the SY-CPROG. I am not absolutely sure, if this is the correct field, but check/compare all the fields in SY structure. There should be a difference between creating/changing the trip in ESS (with the web dynpro application) and creating/changing the trip in backend transaction.
    If you can find the difference, it should be an easy task to prepare a check function module for the CREATED event to prevent the workflow starting in the specific circumstances.
    There are probably also other alternatives, but this is something you should definately check.
    Regards,
    Karri

  • How do I manually start a workflow to...

    I have a list with 2000+ items in it. I create a 2013 workflow in SPD that will look at an item and if it date is less than 1/1/2013 it will create a copy of the item on a list used for archiving, then delete the existing list item. 
    My question is how do i manually start this workflow on the entire list (instead of selecting 1 item at a time)?
    Thanks
    James T.F

    @Romeo
    I've found to potential PowerShell scripts that could launch a list workflow from powershell, but they both throw errors for me. 
    # URL of the Site
    $web = Get-SPWeb -Identity "https://sharepointsrv/site1"
    $manager = $web.Site.WorkFlowManager
    # Name of the list
    $list = $web.Lists["Shared Documents"]
    # Name of the Workflow
    $assoc = $list.WorkflowAssociations.GetAssociationByName("On Item Created","en-US")
    $data = $assoc.AssociationData
    $items = $list.Items
    foreach($item in $items)
    $wf = $manager.StartWorkFlow($item,$assoc,$data,$true)
    $manager.Dispose()
    $web.Dispose()
    this gives me the following error
    Exception calling "StartWorkflow" with "4" argument(s): "Value cannot be null."
    At line:15 char:28
    + foreach($item in $items) { $workflow = $workFlowManager.StartWorkFlow($item,$wor ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentNullException
    The other PS Script
    $sourceWebURL = '<URL>'
    $sourceListName = '<List Name>'
    $TargetWorkflow = '<Workflow Name>'
    $spSourceWeb = Get-SPWeb $sourceWebURL
    $spSourceList = $spSourceWeb.Lists[$sourceListName]
    #Getting a Workflow manager object to work with.
    $wfm = New-object Microsoft.SharePoint.WorkflowServices.WorkflowServicesManager($spSourceweb)
    #Getting the subscriptions
    $sub = $wfm.GetWorkflowSubscriptionService()
    #Getting the specific workflow within the list of subscriptions on the specific list. (SP2010 associated workflows basically)
    $WF = $sub.EnumerateSubscriptionsByList($spSourcelist.ID) | Where-Object {$_.Name -eq "$TargetWorkflow"}
    #Getting a Workflow instance in order to perform my commands.
    $wfis=$wfm.GetWorkflowInstanceService()
    Foreach($item in $spSourceList){
    #Creating the dictonary object I need to parse into StartWorkflow. This could be most other workflow commands.
    $object = New-Object 'system.collections.generic.dictionary[string,object]'
    $object.Add("WorkflowStart", "StartWorkflow");
    $wfis.StartWorkflowOnListItem($WF, $item.ID, $object)}
    Which then gives me this error.
    Cannot convert argument "itemId", with value: "GUID", for "StartWorkflowOnListItem" to type "System.Int32": "Cannot convert the "GUID" value of type "System.Guid" to type
    "System.Int32"."
    At line:23 char:5
    + $wfis.StartWorkflowOnListItem($WF, $item.ID, $object)
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodArgumentConversionInvalidCastArgument

  • How to start/stop Event Mgr. and RFID information server?

    I take over our form RFID admin (who quit) position.
    I cannot find any document which tells me How to start/stop Event Mgr. and RFID information server.
    Even the "Sun Java System RFID Software 3.0 Administration Guide" does not have this piece of info.
    Would you please help? Points guaranteed. Thanks!

    Ashley you are still not clear to me.
    Please mention what applications are these??
    Is it SAP Event Manager??
    What is the RFID Information server??
    Is it SAP based, or some other vendor??
    How is the integration done?
    Thanks

  • How to automatically start a workflow?

    All,
    I need to start a workflow item automatically based upon a table insert. I was hoping to use a trigger, but I could do it from within the application too.
    I have a simple workflow itemtype defined in workflow builder. It has several attributes.
    I found the pl/sql procedure of LaunchProcess which does
    CreateProcess and StartProcess, so I guess I am to use this?
    How/where do I populate the attribute values?
    Thanks,
    Tim

    Hi Tim,
    You set the attribute values by using the procedures
    wf_engine.SetItemAttrText
    wf_engine.SetItemAttrNumber
    wf_engine.SetItemAttrDate
    depending on the datatype of your attribute.
    You may also wish to use the procedure
    wf_engine.SetItemOwner
    to indicate the role that owns the item you are launching.
    Thanks,
    Gavin

Maybe you are looking for