Trigerring workflow through status management

Hi Abappers,
        I am new to workflow, can any body tell me how to trigger a workflow using.
      1. Change Management Document
      2. Status Management.
Regards,
Narendiran Rathinavelu.

Dear Narendiran
Got it..No need to create your own Object.There is a object called "ZBUS2012" for purchase order  (Go to SWO1 you will find it in Object reposatory browser)Take its "Realeased" Event as your triggering event and u r done.
And if you still wanna use your own object then use method "create_event*" to fire your own event and take that event as your triggering event in workflow
Hope this will help
Also sent one good ppt for basic workflow design..refer it..
Reward points please
Regards
Message was edited by: Tushar Mundlik

Similar Messages

  • Workflow through status change

    I have a Customer quotation which has different statuses in the system.
    When a quote is 'approved/rejected' i need to send a mail to distributor though workflow. Quote user status is written to change documents.
    status management --> customer settings
    I maninted the statusOT as 'VBK', status profile xxx, bo 'zbus2031' and event 'statuschange'.
    status restrictions maintained the user status codes 'zapp' n 'zrej'.
    Delegated the object zbus2031 and created an event, this event is the triggering event for my workflow.
    When i try to change the status to rejected or approved, event 'statuschange' is not triggered checked in the trace.
    Quote changes are stored in jcds,jcdo,jest tables.
    This change doc key field value is different from zbus2031-objectkey.
    Am i missing anything? Inputs will be appreciated.

    Hi Indira,
    In this case you may want to break the problem down to see where the issue actually is.  First I would set up the status management to trigger one of the existing simple events - such as bus2031 CHANGED and see if your status restrictions work.  If this fails then the issue is with the restrictions. 
    If so pare the restrictions back until it publishes and see what you needed to do to get there.  Then it is a case of adding each part and testing at each point so you nail where the issue lies.  I have had to use this approach as once ALL the config is done, analysing where or what is not correct is impossible.
    Regards
    Gareth

  • Event triggering through status change

    Hi,
    Currently I am learning workflow. I came to know that events could be triggered even with a status change. Could anyone let me what does "status change" mean? It would be better if anyone give me a high-level view of an example related to this?
    Thank you,
    Raja

    Hi Raja,
    Take an example of Service notification.
    It can have differnt technical status like <i>Created, Inprocess, Technically complete</i> or <i>Released</i>.
    Based on the particular status, say when notification is <b>Technically complete</b>, you want to inform somebody, you can do it with workflow and status management.
    Hope it clarifies idea of status changes/ management.
    For more help refer:
    http://help.sap.com/saphelp_47x200/helpdata/en/c5/e4aee2453d11d189430000e829fbbd/content.htm
    Regds,
    Akshay

  • CRM ORDER CHANGE AND STATUS MANAGEMENT - workflow

    Hi,
    We have created a Changed method for bus2000120 which is configured to fire when the Order is saved via Status Management.  We have added an entry to BSVW for the object, bus2000120.changed with no restrictions.  We have also created a function module that checks to see if the user status is E0005 or E0007 or it deletes the object from the Event table.  I see that this works correctly, however, a given SAVE of a transaction is firing 2 bus2000120.changed for the exact same user and system status.  (I know that it is firing 2 bus2000120.changed because I ran swels and swel. The event was listed twice. Please remember that the Event table when read directly after the save only lists bus2000120.changed one time.)
    There is only 1 entry in the event linkage(swetypv) for bus2000120.changed and it has a condition of the same user status, e0005 or e0007.  No real problem here, however, since there were 2 firings it runs the workflow twice.
    When you look at the extras-change documents you can see that the Header is changed twice, once for a system status and once for the user status.  I am assuming that since there are 2 changes, this is what is doing both firings.
    The funny thing is that if I fall into our custom code in debug where we are reading the status and event tables I only see bus2000120.changed.
    Any ideas on how I might solve this problem?  Do you believe I am correct in assuming that the 2 status changes to the header of the transaction is how both events are being fired?  If not, any guidance you might give would be greatly appreciated.

    see post stream, solved via sap note 1063138

  • Workflow Internal Status: Cancelled

    Dear All,
    We have a SharePoint/Project Server 2013 Enterprise Edition and Sharepoint Designer deployment in HYPER V virtual environment. We are using it for Project Management. We are facing an issue while designing a workflows in SharePoint
    designer 2013.
      PROBLEM DESCRIPTION:
    “Workflow Internal Status: Cancelled
    " ERROR: 
    RequestorId: 7b51f972-22ad-faa7-a60a-20f365bff1e3. Details: System.ApplicationException: HTTP 500 {"SPRequestGuid":["7b51f972-22ad-faa7-a60a-20f365bff1e3"],"request-id":["7b51f972-22ad-faa7-a60a-20f365bff1e3"],"X-FRAME-OPTIONS":["SAMEORIGIN"],"SPRequestDuration":["116"],"SPIisLatency":["0"],"MicrosoftSharePointTeamServices":["15.0.0.4481"],"X-Content-Type-Options":["nosniff"],"X-MS-InvokeApp":["1;
    RequireReadOnly"],"Date":["Tue, 24 Dec 2013 19:28:11 GMT"],"Server":["Microsoft-IIS\/7.5"],"X-Powered-By":["ASP.NET"]} at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext
    context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager
    bookmarkManager, Location resultLocation) "
    Workflow stage status: Workflow is still in processing please refresh the page and try again
    After configuring the workflow in SharePoint designer followed below mentioned TechNet blog to go through the workflow designing
    URL: http://msdn.microsoft.com/en-us/library/office/jj163494.aspx
    As in the blog project Event is set to when project is submitted, we tried a lot to submit the project but submit button was grayed out and unable to do this, then we changed to event
    when project is committed from that above mentioned errors are occurred. Moreover we have tried to make simpler workflow but same result.
    Detailed Description:
    Installation of Workflow Manager 1.0
    Installation of Service Bus and CU1
    Start App Management Service (Also Configured in Managed Service App)
    Start User Profile Service (Also Configured in Managed Service App)                      
    Run the full user profile sync and Completed
    Created the workflow using domain user account and assigned him proper permission
    Thanks in Advance 
    REGARDS DANISH DANIE

    If the workflow initiator does not have write access to the hidden Workflow History List, the same error happens.
    To solve the issue, simply open the hidden list permission (through SharePoint Designer>All Files>Lists, for example) and make sure to have your potential initiators contribute rights. The list defaultly inherits the site's permissions.
    kirtesh

  • Mapping runs through Deployment Manager but hangs in Process Flow

    Hi,
    I have a Mapping bound in a simple Process Flow.
    The mapping deploys through Deployment Manager and runs. It currently processes no rows and takes a couple of seconds to do that. It completes with a Success message.
    However, when I wrap it into a simple Process Flow...
    --- w ---> END_WARNING
    START ---> MY_MAPPING ---- s ---> END_SUCCESS
    --- e ---> END_ERROR
    .., deploy this and run it through the Deployment Manager, it hangs. I get the 'Execution in progress...' window with the moving graphic forever.
    The Runtime Repository Browser Execution Report tells me that it is 'Busy', and if I drill down to the Process Flow Run Execution Report, I see an identical Start and End Time, an Elapsed Time of 0 seconds, and no other details (Execution Parameters, Activity Details or Error Messages).
    Looking under 'Find Processes' on the Workflow Home Page, my workflow has no status in the Process List. Drilling down to the Diagram, I have a green line from the 'Start' element to my Mapping but the Mapping itself has no special colour.
    I go back to the Deployment Manager and cancel the job - which it does and reports that it 'Completed with errors'.
    The Runtime Repository Browser Execution Report now tells me that it is 'Busy' (with an information bubble), and if I drill down to the Process Flow Run Execution Report, I see different Start and End Times, and Elapsed Time of n seconds, a single Error Message 'RPE-01002: The operation was aborted at user request.', and no other details (Execution Parameters, Activity Details).
    Looking under 'Find Processes' on the Workflow Home Page, my workflow has a status of 'Complete' in the Process LIst. Drilling down to the Diagram, I still have a green line from the 'Start' element to my Mapping and the Mapping itself still has no colour and no indication that it has stopped.
    I'm running:
    Oracle9i EE 9.2.0.5.0
    Oracle10g OWB Client 10.2.0.1.0
    Oracle10g OWB Repository 10.1.0.1.0
    Anybody know how I can go about tracking down why this Process Flow is hanging - and, of course, getting it unhung :-)
    Regards
    Steve

    Hello Steve,
    It's a little difficult to read the exact flow from your ASCII graphics.
    However, from your description it seems your workflow task only has an outgoing success connector, and your execution was not a success. This will stop the execution of that branch of your process flow, since there are no valid routes to take. If you only have a single branch in your workflow, the process flow is stuck.
    To expedite your hung process you just click on the task icon in the Workflow Monitor graph window that does not have a green outgoing connector, press the Expedite button and select skip.
    Corollary: If you use conditional connectors, always use all 3 from a task. I not using all 3, have a very good understanding of why you don't.
    Regards, Hans Henrik

  • Workflow for Treasury management

    Hi ,
    Can anybody tell me how should i configure the workflow for Treasury management ? . Once the below t codes change the mail should go to the Treasurer ?  And here the Treasurer needs to pick up on Roles assigned ..
    For the  t codes TI10 , TI11, TI37 should get triggeted ? .
    Thnaks&regards
    Srinivas

    Hi,
    I hope you know the process of modeling a workflow. If not follow the tutorial in the help document:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fb/135962457311d189440000e829fbbd/frameset.htm
    If you have already done some workflow modeling then you can proceed as follows:
    1. Check for any standard events. Go to transaction SWEL and see if there are any events triggered by the standard transaction. If yes then you can build your own workflow for that event.
    If there are no standard events then you can raise them from either of the following based on the availability of the same:
    2. Are change documents active? Once you perform the transaction go to transaction SE11 and view the contents of the table CDHDR for the entries with your name as the creator. If the transaction writes a change document then you can trigger off a workflow through an event which is linked to the change document object. For more details go here:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c5/e4aeef453d11d189430000e829fbbd/frameset.htm
    3. If the transaction has a status management built in then you can raise through this as well. For more information see this:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c5/e4aed5453d11d189430000e829fbbd/frameset.htm
    4. If you are not lucky in either of the steps below then you need to implements a User Exit or a BADI and raise an event through the function module: SWE_EVENT_CREATE.
    Hope this helps,
    Sudhi

  • Guidelines on Change documents and Status Management

    Hi Friends,
        I am not sure whether this is the right question or not but I am in desprate need of it.
        The thing I find my self no where sometimes when I think of working on Chagne documents and Status management. I have been into WF for about 2 years. but never got a BEST chance to work on complicate workflows.
         <b>Can anyone give me some ways or links where I can find clear difference between change docs and status mngt and how to work on those ?</b>
        I did search in blogs but didnt find much. so posting a new thread. sorry for the inconvenience.
    Thanks
    Reddy

    Hi Reddy ,
    Go through these links.
    the Tcode for Change document is swec,
    http://help.sap.com/saphelp_47x200/helpdata/en/c5/e4aee2453d11d189430000e829fbbd/frameset.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/8c/1923d1932b11d2a5ea0060087a79ea/frameset.htm
    http://help.sap.com/saphelp_erp2004/helpdata/en/db/7a2a40ce93185de10000000a1550b0/content.htm
    Thanks & Regards
    Hari Sankar M

  • Event creation with status management

    Hello esteemed gurus ... it's your friendly workflow noob again
    It seems once people get a sniff that there is a someone who knows a bit about workflow in the company, everyone wants a piece of you!
    So... I have been asked to setup a workflow that will trigger when a user changes a user status on an SD contract. I've done some reading and I believe I'm nearly there but need a little help ...
    I have setup event creation with transaction BSVZ for object category VBK, specified my status profile, and business object BUS2034 and I'm using the event "CHANGED", within this I have set a status restriction to particular status of my user status profile.
    In my workflow definition I have specified the start event "CHANGED" for my business object BUS2034.
    The thing is, the workflow starts for every change to the contract, whereas I was expecting it to only start when the particular status I defined in my status management was set in the contract header.
    Are there any additional settings I need to make in order to restrict the starting conditions of the this workflow?
    Many thanks once again.
    Neil

    Hi Neil,
    There is two options to restrict the workflow.
    First one is start condition. You can check the workflow log. If your required field is populated in the Workflow container you can use start condition to restrict the workflow. In the Basic data of workflow template, Start condition is there. You can use the condition editor to set the condition.
    If your field is not populated by default, then you can use check function module for this. You need to create one FM, and in transaction swe2, the FM needs to be Configured. The concept is, based on the Sales document number you can get the required field and check the condition inside the FM. If the condition satisfied just leave it. The workflow will be triggered. If the condition is not satisfied raise a Exception. So that the Workflow will not be triggered.
    Thanks,
    Viji.

  • Can we create a workflow in Solution Manager ?

    Hi Friends,
    Actually I have a requirement to create a workflow in solution manager.
    The requirement is to create a wf for issue log. As soon as a new <b>issue (support message)</b> is created then the wf should get triggered and send out a mail to the resp. person. It just a sending a mail between issue created and responsible person. Can anyone please let me know if we create a wf in Solman or not ? <b>If so please provide me some related buss. obj for that.</b> thanks
    Grateful to your help.
    Srithan

    If you want to Place certain actions after status change of a transaction, it's better to do this with an action profile and a condition for that action:
    In Solman check SPRO path:
    CRM>Transactions>Basic settings-->Define transaction types
    In this activity double click the transaction type to find out what the action profile is:
    Now go to:
    CRM>Basic functions>Actions>Actions in transactions>Change actions and conditions-->Define action profiles and actions
    Here you can add an action definition on the action profile, this can be methods, workflow or in your case a smartform mail.
    If the action profile is a SAP standard (doesn't begin with Z) it is advisable to copy the standard. Also, this is more of a CRM/Solman consultant issue, so you may have to involve such a consultant
    Now go to
    CRM>Basic functions>Actions>Actions in transactions>Change actions and conditions-->Define Conditions
    Here you can add conditions which will cause the action to be executed.
    Kind regards, Rob Dielemans

  • Regarding status management

    Hi,
    I have a situation, wherein when a sales order is created, it is assigned a user status of CRTD using status management configuration. My requirement is to track a particular document's user status or system status to trigger a workflow if the document is complete with respect to header and item level info, and the status is in CRTD. I can check the completeness from VBUK table, but does anyone know as to which table the status profile values are stored in? Thanks for the help in advance.
    Regards,
    Vijay

    Hi ,
    Check the table JSTO & Jest table.
    Also check the FM STATUS_READ
    Thanks
    Rajeev

  • Unable to start SOA server through Node Manager

    Hi All,
    I am trying to install AIA 11.1.1.6.0 on the top of SOA Suite 11.1.1.6.0.
    I was able to install successfully the weblogic server, rcu, soa and osb servers. Now, before installing the AIA, the document i am following it says, make sure to start the soa server through the node manager.
    Now i start the admin server, then the node manager, to make sure i have checked that the node manager is up, i logged in to the weblogic console, went to Machines, and i can see that it is up and reachable.
    Now using the WLST commands, first i connected to the node manager using command nmConnect(), then i am trying to start the soa server through node manager using the command start('soa_server1') command.
    I am getting an error while trying to start soa server with nmStart() command, below is the error message...
    "Error starting server soa_server1: weblogic.nodemanager.NMException: Exception while starting server 'soa_server1'"
    I executed the dumpStack() command, and i am getting the output as "No stack trace available"
    If i am able to start the soa server through the node manager, i can go ahead and install the AIA pack but this is not letting me go forward.
    I also tried to start the soa server through the weblogic console., go to servers tab, select the soa_server1 and start, the soa server state is going to "FAILED_NOT_RESTARTABLE".
    I followed some of the blogs like...
    http://neeraj-soa-tips.blogspot.com/2010/06/starting-admin-and-managed-servers.html
    http://www.javamonamour.org/2011/09/nmconnect-nmstart-nmkill.html
    Experts, please give your advice.
    Many Thanks,
    N

    Hi Narsing,
    I'm assuming that you've followed the required Pre-config steps. If it is not working, I'd suggest to start the Admin and SOA server without node manager first. Then start your node manager and see if it is reachable from the WLS console. Then shut down your SOA server from command prompt and restart your SOA server from WLS console.
    Verify the Listen Address of your Node Manager and start your node manager from command prompt by explicitly specifying the same address and port.
    As WLS console internally uses node manager only to start your server, you would not need to use WLST scripts to do the same and only SOA server needs to be started using node manager.
    Regards,
    Neeraj Sehgal
    Hi Neeraj,
    I made sure that in the weblogic console, in the machines tab, local machine-->configuration--->Node Manager, I have given the correct Listen Address (Narsing-PC) and the listen port 5556.
    I have made sure the property StartScriptEnabled= true.
    I have started the admin server through startWebLogic.cmd command, now i start the node manager by going to the C:\Oracle\Middleware\wlserver_10.3\server\bin and running the command startNodeManager.cmd, then i go to the weblogic console--->servers--->control--->soa_server1--->start , it is going to      FAILED_NOT_RESTARTABLE status.
    If i see the log messages in the nodemanager.log, this is the below message...
    <Jun 28, 2012 11:25:09 PM> <INFO> <soa_domain> <soa_server1> <Server output log file is 'C:\Oracle\Middleware\user_projects\domains\soa_domain\servers\soa_server1\logs\soa_server1.out'>
    <Jun 28, 2012 11:25:11 PM> <INFO> <soa_domain> <soa_server1> <Server failed during startup so will not be restarted>
    <Jun 28, 2012 11:25:11 PM> <WARNING> <Exception while starting server 'soa_server1'>
    java.io.IOException: Server failed to start up. See server output log for more details.
         at weblogic.nodemanager.server.AbstractServerManager.start(AbstractServerManager.java:196)
         at weblogic.nodemanager.server.ServerManager.start(ServerManager.java:23)
         at weblogic.nodemanager.server.Handler.handleStart(Handler.java:609)
         at weblogic.nodemanager.server.Handler.handleCommand(Handler.java:121)
         at weblogic.nodemanager.server.Handler.run(Handler.java:71)
         at java.lang.Thread.run(Thread.java:662)
    The log message in the soa_server1.out file is as below...
    Starting WLS with line:
    C:\Oracle\MIDDLE~1\JDK160~1\bin\java -client -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8453,server=y,suspend=n -Djava.compiler=NONE -Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m -Dweblogic.Name=soa_server1 -Djava.security.policy=C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.policy -Dweblogic.system.BootIdentityFile=C:\Oracle\Middleware\user_projects\domains\soa_domain\servers\soa_server1\data\nodemanager\boot.properties -Dweblogic.nodemanager.ServiceEnabled=true -Dweblogic.security.SSL.ignoreHostnameVerification=false -Dweblogic.ReverseDNSAllowed=false -Xverify:none -da:org.apache.xmlbeans... -ea -da:com.bea... -da:javelin... -da:weblogic... -ea:com.bea.wli... -ea:com.bea.broker... -ea:com.bea.sbconsole... -Dplatform.home=C:\Oracle\MIDDLE~1\WLSERV~1.3 -Dwls.home=C:\Oracle\MIDDLE~1\WLSERV~1.3\server -Dweblogic.home=C:\Oracle\MIDDLE~1\WLSERV~1.3\server -Dcommon.components.home=C:\Oracle\MIDDLE~1\ORACLE~1 -Djrf.version=11.1.1 -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -Ddomain.home=C:\Oracle\MIDDLE~1\USER_P~1\domains\SOA_DO~1 -Djrockit.optfile=C:\Oracle\MIDDLE~1\ORACLE~1\modules\oracle.jrf_11.1.1\jrocket_optfile.txt -Doracle.server.config.dir=C:\Oracle\MIDDLE~1\USER_P~1\domains\SOA_DO~1\config\FMWCON~1\servers\soa_server1 -Doracle.domain.config.dir=C:\Oracle\MIDDLE~1\USER_P~1\domains\SOA_DO~1\config\FMWCON~1 -Digf.arisidbeans.carmlloc=C:\Oracle\MIDDLE~1\USER_P~1\domains\SOA_DO~1\config\FMWCON~1\carml -Digf.arisidstack.home=C:\Oracle\MIDDLE~1\USER_P~1\domains\SOA_DO~1\config\FMWCON~1\arisidprovider -Doracle.security.jps.config=C:\Oracle\MIDDLE~1\USER_P~1\domains\SOA_DO~1\config\fmwconfig\jps-config.xml -Doracle.deployed.app.dir=C:\Oracle\MIDDLE~1\USER_P~1\domains\SOA_DO~1\servers\soa_server1\tmp\_WL_user -Doracle.deployed.app.ext=\- -Dweblogic.alternateTypesDirectory=C:\Oracle\MIDDLE~1\ORACLE~1\modules\oracle.ossoiap_11.1.1,C:\Oracle\MIDDLE~1\ORACLE~1\modules\oracle.oamprovider_11.1.1 -Djava.protocol.handler.pkgs=oracle.mds.net.protocol"|"oracle.fabric.common.classloaderurl.handler"|"oracle.fabric.common.uddiurl.handler"|"oracle.bpm.io.fs.protocol -Dweblogic.jdbc.remoteEnabled=false -Doracle.security.jps.policy.migration.validate.principal=false -da:org.apache.xmlbeans... -Dbpm.enabled=true -Dsoa.archives.dir=C:\Oracle\Middleware\Oracle_SOA1\soa -Dsoa.oracle.home=C:\Oracle\Middleware\Oracle_SOA1 -Dsoa.instance.home=C:\Oracle\MIDDLE~1\USER_P~1\domains\SOA_DO~1 -Dtangosol.coherence.clusteraddress=227.7.7.9 -Dtangosol.coherence.clusterport=9778 -Dtangosol.coherence.log=jdk -Djavax.xml.soap.MessageFactory=oracle.j2ee.ws.saaj.soap.MessageFactoryImpl -Dweblogic.transaction.blocking.commit=true -Dweblogic.transaction.blocking.rollback=true -Djavax.net.ssl.trustStore=C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\DemoTrust.jks -Dem.oracle.home=C:\Oracle\Middleware\oracle_common -Djava.awt.headless=true -Dbam.oracle.home=C:\Oracle\Middleware\Oracle_SOA1 -Dums.oracle.home=C:\Oracle\Middleware\Oracle_SOA1 -Dweblogic.management.discover=false -Dweblogic.management.server=http://localhost:7001 -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=C:\Oracle\MIDDLE~1\patch_wls1036\profiles\default\sysext_manifest_classpath;C:\Oracle\MIDDLE~1\patch_oepe180\profiles\default\sysext_manifest_classpath;C:\Oracle\MIDDLE~1\patch_ocp371\profiles\default\sysext_manifest_classpath;C:\Oracle\MIDDLE~1\patch_adfr1111\profiles\default\sysext_manifest_classpath weblogic.Server
    FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
    ERROR: transport error 202: bind failed: Address already in use
    ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
    JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:690]
    <Jun 28, 2012 11:25:11 PM> <FINEST> <NodeManager> <Waiting for the process to die: 4808>
    <Jun 28, 2012 11:25:11 PM> <INFO> <NodeManager> <Server failed during startup so will not be restarted>
    <Jun 28, 2012 11:25:11 PM> <FINEST> <NodeManager> <runMonitor returned, setting finished=true and notifying waiters>
    Someone please help, if i am able to start the soa manged server, i can go ahead and install the AIA Foundation pack...
    Many Thanks.

  • How to execute workflow through javascript in CRM 2013

    Hi,
    I have created a business process and I want to execute workflow on custom button through javascript. I tried this script but this script does not run after message box show. Please tell me how to execute my workflow through javascript
    function RunWorkflow() {
        var _return = window.confirm('Are you want to execute workflow.');
        if (_return) {
            var url = Xrm.Page.context.getServerUrl();
            var entityId = Xrm.Page.data.entity.getId();
            var workflowId = '541B45C9-3F88-4448-9690-2D4A365C3172';
            var OrgServicePath = "/XRMServices/2011/Organization.svc/web";
            url = url + OrgServicePath;
            var request;
            request = "<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">" +
                          "<s:Body>" +
                            "<Execute xmlns=\"http://schemas.microsoft.com/xrm/2011/Contracts/Services\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\">"
    +
                              "<request i:type=\"b:ExecuteWorkflowRequest\" xmlns:a=\"http://schemas.microsoft.com/xrm/2011/Contracts\"
    xmlns:b=\"http://schemas.microsoft.com/crm/2011/Contracts\">" +
                                "<a:Parameters xmlns:c=\"http://schemas.datacontract.org/2004/07/System.Collections.Generic\">"
    +
                                  "<a:KeyValuePairOfstringanyType>" +
                                    "<c:key>EntityId</c:key>" +
                                    "<c:value i:type=\"d:guid\" xmlns:d=\"http://schemas.microsoft.com/2003/10/Serialization/\">"
    + entityId + "</c:value>" +
                                  "</a:KeyValuePairOfstringanyType>" +
                                  "<a:KeyValuePairOfstringanyType>" +
                                    "<c:key>WorkflowId</c:key>" +
                                    "<c:value i:type=\"d:guid\" xmlns:d=\"http://schemas.microsoft.com/2003/10/Serialization/\">"
    + workflowId + "</c:value>" +
                                  "</a:KeyValuePairOfstringanyType>" +
                                "</a:Parameters>" +
                                "<a:RequestId i:nil=\"true\" />" +
                                "<a:RequestName>ExecuteWorkflow</a:RequestName>" +
                              "</request>" +
                            "</Execute>" +
                          "</s:Body>" +
                        "</s:Envelope>";
            var req = new XMLHttpRequest();
            req.open("POST", url, true)
            // Responses will return XML. It isn't possible to return JSON.
            req.setRequestHeader("Accept", "application/xml, text/xml, */*");
            req.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
            req.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Execute");
            req.onreadystatechange = function () { assignResponse(req); };
            req.send(request);
    function assignResponse(req) {
        if (req.readyState == 4) {
            if (req.status == 200) {
                alert('successfully executed the workflow');

    Hi,
    I used this script for execute the workflow but its not working. When I used alert(req.status); then 500 show. Please tell me what did I mistake in my script.
    function RunWorkflow() {
        var _return = window.confirm('Are you want to execute workflow.');
        if (_return) {
            var url = Xrm.Page.context.getClientUrl();
            var entityId = Xrm.Page.data.entity.getId();
            var workflowId = '541B45C9-3F88-4448-9690-2D4A365C3172';
            var OrgServicePath = "/XRMServices/2011/Organization.svc/web";
            url = url + OrgServicePath;
            var request;
            request = "<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">" +
                          "<s:Body>" +
                            "<Execute xmlns=\"http://schemas.microsoft.com/xrm/2011/Contracts/Services\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\">"
    +
                              "<request i:type=\"b:ExecuteWorkflowRequest\" xmlns:a=\"http://schemas.microsoft.com/xrm/2011/Contracts\"
    xmlns:b=\"http://schemas.microsoft.com/crm/2011/Contracts\">" +
                                "<a:Parameters xmlns:c=\"http://schemas.datacontract.org/2004/07/System.Collections.Generic\">"
    +
                                  "<a:KeyValuePairOfstringanyType>" +
                                    "<c:key>EntityId</c:key>" +
                                    "<c:value i:type=\"d:guid\" xmlns:d=\"http://schemas.microsoft.com/2003/10/Serialization/\">"
    + entityId + "</c:value>" +
                                  "</a:KeyValuePairOfstringanyType>" +
                                  "<a:KeyValuePairOfstringanyType>" +
                                    "<c:key>WorkflowId</c:key>" +
                                    "<c:value i:type=\"d:guid\" xmlns:d=\"http://schemas.microsoft.com/2003/10/Serialization/\">"
    + workflowId + "</c:value>" +
                                  "</a:KeyValuePairOfstringanyType>" +
                                "</a:Parameters>" +
                                "<a:RequestId i:nil=\"true\" />" +
                                "<a:RequestName>ExecuteWorkflow</a:RequestName>" +
                              "</request>" +
                            "</Execute>" +
                          "</s:Body>" +
                        "</s:Envelope>";
            var req = new XMLHttpRequest();
            req.open("POST", url, true)
            // Responses will return XML. It isn't possible to return JSON.
            req.setRequestHeader("Accept", "application/xml, text/xml, */*");
            req.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
            req.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Execute");
            req.onreadystatechange = function () { assignResponse(req); };
            req.send(request);
    function assignResponse(req) {
        if (req.readyState == 4) {
    alert(req.status);
            if (req.status == 200) {
                alert('successfully executed the workflow');

  • Batch status Management Active

    Hi SAP Gurus!
    We have SAP implemented in our organization 4 years back and from that time Batch status Management is not active in our system.
    Now, we want to activate batch status at Plant level. So, that for any certain plant we can manage it through batch status management. Our material batch is unique at clienet level.
    Any material X - Plant 0001 - Batch B1
            material X - Plant 0002 - Batch B2
    How we can activate batch status management for above scenario. Also, I want to know if client level batch status management is active irrespective of plant, then what will be settings and impact on business.
    Kindly let me know the details about different settings and busines imapct. Stepwise settings will help much to me.
    Thanks in advance.
    Regards
    roys

    the status managment correlates with teh batch level.
    if the batch level is client level, then the batch is unique in your system, in whatever plant you have this batch, it is the same material and same batch.
    if you change the status of this batch from unrestricted to restricted, then you effect inventory in all plants that have this batch.
    http://help.sap.com/saphelp_46c/helpdata/en/25/283a594f7811d18a150000e816ae6e/content.htm

  • Which CRM module does Status Management belong to?

    I searched through the CRM 4.0 training materials but did not find the status management in any book. Can someone let me know?

    Hi Leon Cao,
    This status management generally comes under "Basic Functions" of CRM Business Transactions.
    Hope this helps in your search

Maybe you are looking for

  • Afraid of executing a script on server

    I have to make a script which deletes all the folders and files in the following directories on Windows Server 2008: D:\frotxy\out\backup\ D:\frotxy\in\backup\ Yesterday I tried executing the script from my Desktop to delete the files in a test folde

  • Installed flash disk does not boot (Solaris 10 on Fore CPU-50 VME cpu-card)

    Greetings, After installation of Solaris on a system with a flask disk as system disk, the disk is not bootable. Configuration: System: Fore CPU-50 VME cpu-card (sparc50) OS: Solaris 10 (Sparc version, CD-media) System-disk: ADTRON S35FA-8GC20N Smart

  • What Can I Do About This Error?

    I have 2 form programs. The first program is the main menu. The user pushes a button and the program transfers control to a second form program. On this second screen, the user enters an SSAN. At the bottom of the screen there is a message which says

  • HT4587 Airport Express - New WiFi Router

    I recently switched my wireless router.  It's the same network name but a different password.  Now I can't figure out how to get my Airport Express to connect to the new router. Any suggestions?

  • SSL Strust : Issuer certificate missing in database

    Hi, I am apply ssl in Abap stack STRUST.  When i apply the certificate respond from the CA , it showing error Issuer certificate missing in database:CN=DigiCert High Assurance CA-3, OU=www.digicert.c Any idea?? Thanks