State Machine workflow if else branch

I have a scenario that have 4 level of approvals on every approval if it is accepted it is coming to the requestor who submitted it i need to make a condition that
Approval level1=Supervisor
Approval level2=Dept Manager
Approval level3=VP
Approval Level4=HR committee
request is submitted by reguester a user
if requester reject the approval level 1 it should move to the target state 2 (Approval level2)
if requester reject the approval level 2 it should move to the target state 3(Approval level3)
if requester reject the approval level 3 it should move to the target state 4(Approval Level4)
i have a state for requestor where once the requester reject i have to move it to one target state
how can i acheeive above bold requirements?
MCTS,ITIL

This is easy to do if you are using Visual Studio to create your workflow.  Simply define each Approval level as a different state and evaluate what the target state should be at the end of each state.
But if you want to do this using SharePoint Designer then you should know that SPD only does sequential workflows, not state machine.  To do this kind of workflow in SPD most people break it into 5 workflows.  One main workflow and 4 separate workflows
for each stage.  Then at the end of each workflow decide which other workflow to start. 
Paul Stork SharePoint Server MVP
Principal Architect: Blue Chip Consulting Group
Blog: http://dontpapanic.com/blog
Twitter: Follow @pstork
Please remember to mark your question as "answered" if this solves your problem.

Similar Messages

  • Create Multiple tasks for Single Item in List using state machine workflow in sharepoint

    Hi,
    I want to create multiple create tasks for Single Item in List based on Assigned to column using state machine Workflow through visual studio
    Here Assigned to column allows multiple users. so i have to create task for every user based on column .
    I'm trying for this but i didn't got any solution
    Please provide solution for this.

    Hi,
    According to your post, my understanding is that you wanted to allow multiple users to approve.
    There are some articles about creating parallel tasks in state machine workflow, you can have a look at them.
    http://www.codeproject.com/Articles/477849/Create-Parallel-Task-in-State-Machine-Workflow-in
    http://msdn.microsoft.com/en-us/library/office/hh128697(v=office.14).aspx
    http://social.technet.microsoft.com/Forums/office/en-US/b16ee858-4360-479a-a686-4ee35b7be9db/sharepoint-2010-workflow-creating-multiple-tasks?forum=sharepointdevelopmentprevious
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Stat machine workflow task workflow status different values on different state activity(Approval level)

    i have developed the State machine workflow in which i am using default workflow task
    i have added one status dropdown and that is having approve or reject that i set using workflow task drop down values
    now my requirement is that when my workflow goes to different approval i need to have different status values in dropdown
    for example
    on manager approval state activity i need to add additional status value forward to legal
    but when it moved to next activity this task status field should show only approve and reject
    in summary i need to have different status values for workflow task when it moved to different state activity(approval levels)
    can we set these status field of task for state machine workflow programtically as well like for different approval level of task i need different status to be set for the dropdown of task status field
    MCTS,ITIL

    Hi Shahid Siddique,
    I have seen a similar thread from you about this issue, create custom form for the seperate form is a considerable workaround, you can have a check whether it works.
    http://social.technet.microsoft.com/Forums/en-US/9baa0c32-1cde-4c58-aa7c-3568ccf0cdc9/different-approval-level-of-task-i-need-different-status-to-be-set-for-the-dropdown-of-task-status?forum=sharepointdevelopmentprevious
    Thanks,
    Qiao Wei
    TechNet Community Support

  • How to REpublish Custom Task Forms (InfoPath) to SharePoint 2010 State Machine Workflows

    I am new to SharePoint. Sorry if answer to my question is obvious.
    I've create Custom Task Form in InfoPath and publish it (File/Publish/Network Location [Form Template Path and filename='MYPROJECT/Forms/ApprovalForm.xsn'; Form template name='ApprovalForm'], in the next window I've cleared Public URL according to the articlehttp://www.codeproject.com/Articles/195348/SharePoint-2010-State-Machine-Workflows-with-Custo).
    After it I've added module Forms, and added ApprovalForm.xsn from the existing items.
    My xml files: Elements.xml
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <Workflow
    Name="Order New Server"
    Description="My SharePoint Workflow"
    Id="482cbc86-b717-4981-a49a-3cf4c89e9399"
    CodeBesideClass="Myproj.OrderNewServer.OrderNewServer"
    CodeBesideAssembly="$assemblyname$"
    TaskListContentTypeId="0x01080100C9C9515DE4E24001905074F980F93160">
    <Categories/>
    <AssociationData><Data></Data></AssociationData>
    <MetaData>
    <AssociationCategories>List</AssociationCategories>
    <Task2_FormURN>urn:schemas-microsoft-com:office:infopath:ApprovalForm:-myXSD-2012-03-09T14-11-55</Task2_FormURN>
    <StatusPageUrl>_layouts/WrkStat.aspx</StatusPageUrl>
    </MetaData>
    </Workflow>
    </Elements>
    Feature.Template.xml:
    <?xml version="1.0" encoding="utf-8" ?>
    <Feature xmlns="http://schemas.microsoft.com/sharepoint/" ReceiverAssembly="Microsoft.Office.Workflow.Feature, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Receiverlass="Microsoft.Office.Workflow.Feature.WorkflowFeatureReceiver">
    <Properties>
    <Property Key="GloballyAvailable" Value="true" />
    <Property Key="RegisterForms" Value="Forms\*.xsn"/>
    </Properties>
    </Feature>
    My form work fine, but when I make changes and republish it, it doesn't update (I see old form). What I tryed:
    IISReset
    Clear all cookies and cache in IE
    Retract solution, restart VS2010, reboot computer.
    Change assembly number, guid.
    I have no ideas, what can I try for republish my form with changes.
    Thank you in advance for any suggestions.
    PS: sorry for my writing. English is not my native language.
    PPS: when I save new Form to new location and add it to the project, it works.

    I've found how can I republish changes. But it seems more like crutch than solution, but it works:
    After republishing InfoPath form, I delete file from project (DEL on ApprovalForm.xsn in Solution explorer) and after it add it again. (Add/Existing Item). And then redeploy! Hurray!
    Is there any way to redeploy a Task Form directly on the server without importing it in Visual Studio again? I am using some data connections in my task form which are different for different environments (staging, dev. etc.). Seems like I've to create a separate
    Workflow WSP file for each envrionment. Any comments?

  • How to update task status from custom task in state machine workflow

    i m using custom task for state machine workflow
    i am using
    if(this.onTaskChangedSupervisorAction_AfterProperties.ExtendedProperties["Workflowstatus"].ToString().Contains("Approved"))
    if above is true moving forward its working fine but i want to update the status field of task as i can update the title and due date for the task but how can i change the status once approved it
    should show the status as approved it's only showing in progress
    this.CreateTaskSupervisorAction_TaskProperties.Title="supervisor task"
    MCTS,ITIL

    If your task shows In Progress state then I think you need to look at your workflow and make sure you are using Complete Task activity and if you are already using Complete Task Activity then verify the Correlation ID. Ideally you are not required to set
    this value in workflow. You simply use the Complete Task Activity.
    If you are running into issue where your workflow is staying in In Progress state even after the task is complete then you can look at the following blog post.
    How to programmatically complete Approval workflow task
    Amit

  • How to debug Sequential workflow and state machine workflow?

    Hi All,
    How to debug Sequential workflow and state machine workflow?
    Thanks in Advance!

    check this
    http://msdn.microsoft.com/en-IN/library/bb386166(v=vs.90).aspx
    http://msdn.microsoft.com/en-us/library/vstudio/ee231573(v=vs.100).aspx

  • Using SPUtility.SendEmail inside a state machine workflow not working

    I have a State Machine Workflow. I have developed in visual studio 2010 for a SharePoint 2010 site. I want to send emails to couple of people inside an activity and my code will decide the email receiver. When I assign the task from my code to some one the
    State Machine workflow is sending mail to the task assignee and assigning the task to that person. But if I want to send mail to some additional person from the workflow, it is not allowing me to send that. The code I am using for the same is, SPUtility.SendEmail(SPContext.Current.Web,
    headers, mailBody);
    Can any one please let me know, why it is not sending mail with this code, or what can be the solution for the same.
    Thanks

    Hi Monali,
    Thanks for your sharing.
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • SharePoint 2013 State Machine Workflow Developped using Visual Studio 2013 Terminated

    Hi all,
    I developped a state machine workflow using Visual Studio 2013, and deplyed to SharePoint 2013, the workflow work fine for first task, and some times for second task.
    after that the workflow become terminated with below error:
    - System.Activities.Statements.WorkflowTerminatedException: The workflow instance exceeded the throttle of 10000 activities executed in a row and could not be unloaded because it was not persistable.
    I spent many days to solve this issue but witout any result...
    Please advice...

    Hi,
    According to your description, there seems an endless loop in your workflow which makes the workflow exceed the throttle.
    A suggestion is that you can create a new clean sample state machine workflow firstly, when it works without error, then adding other activities with custom logic
    gradually.
    By doing this, it would be easier to find out what might cause the error in this workflow.
    A demo about Create State machine Workflow In SharePoint 2013 for your reference:
    http://www.splessons.com/2013/12/create-state-machine-workflow-in-sharepoint-2013-using-visual-studio-2012/
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • How to Create Step By Step Sequential And State Machine Workflows?

    Hi All,
    I am very new to workflows, can any one help me to how to create workflows step by step using visual studio.
    Can any one explain with example.

    Hello,
    Here is the MSDN article for your ref:
    Sequential WF:
    http://msdn.microsoft.com/en-us/library/office/gg265727%28v=office.14%29.aspx
    State Machine WF:
    http://msdn.microsoft.com/en-us/library/office/gg508985%28v=office.14%29.aspx
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How to create State machine workflow?:

    How to create State machine workflow

    Hi,
    According to your post, my understanding is that you want to send email to Assigned to person when item is created in Task List.
    You can set E-Mail Notification to Yes under your Workflow Tasks list > Settings > Advanced Settings. By doing so user specified in AssignedTo will receive e-mail notification when task is created.
    Here is a similar thread for your reference:
    https://social.technet.microsoft.com/Forums/office/en-US/44f63c3c-8dfc-4f02-b627-a92249404ae3/task-list-advance-settings-email-notification-send-email-when-ownership-is-assigned-or?forum=sharepointgeneral
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Link State machine Workflow to Content Type

    State machine Workflow

    Hi ,
    What purpose do you use the drop down column for?
    Assuming the values of the drop down are No/Yes, you can create the reusable workflow like the screenshot:
    Note: as you only want to have this workflow for a particular content type, you need to use SharePoint 2010 workflow platform.
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • Guide or Information to Create State Machine workflow on SharePoint Designer 2013

    Hi All,
    I am currently working on a workflow that requires 5 approvers who can approve, reject or review and submit again.
    In a situation where an approval is given, the flow goes to the next approver.
    Where it is Review and Submit Again, the control is transferred to the originator who started the the workflow and the entire process restarts
    When it is a reject, the workflow stops.
    Kindly advice on how to get this working.
    Best Regards,
    Ifeatu
    Ifeatu Osegbo

    Hi
    Ifeatu ,
    For achieving your demand, you can take steps as below:
    Add a “Start a task process” action in your workflow.
    Click “these users” and Start a Task Process edit page will pop up.
    In the Participants field, input your 5 approvers based on the order of approval.
    In the right of Participants field, select “Serial (one at a time)”.
    In the Task Options section, select “Wait for specific response” for Completion Criteria.
    For Required Outcome, select “Rejected”.
    Go to workflow setting page, select “Start workflow automatically when an item is created” and “Start workflow automatically when an item is changed” for the Start Options
    setting.
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • State machine site level workflow activated but not showing in the workflow list

    I developed my state machine workflow using visual studio 2010 its successfully deployed; even I can see the feature is activated on site collection level, but its not showing in the list settings --> workflow settings --> add workflow Any Reason ??
    note: I am working on share point 2010
    Nazish Ali Rizvi

    Thanks Bhavik,
    I got the answer , actually I didn't experience it before with site workflows , it shows where we create a list just beside you can find site workflows, off course feature activation is necessary after that for workflow activation this is the way.
    http://www.codeproject.com/Articles/416393/Create-a-Workflow-using-Visual-Studio
    this is also a helpful article.
    Nazish Ali Rizvi

  • How to create a three state approval workflow in SharePoint 2013 using visual studio 2013

    Hi Everyone,
    i have a requirement like 3 state to approve. Here is the details:- when the item added into the list it will go for reviewer. Once the reviewer review the item, he will assign the task to concern person/department(Parallel process more than two persons).
    Once they will approve the request again it will come back to reviewer and he will assign the task to team member(parallel process). Once the team member accepted then workflow terminate.
    i want develop this workflow using visual studio 2013 only, not using designer.. 
    Thanks in Advance.....
    Mallesh

    Hello,
    you can find multiple sample on the web like those
    http://www.splessons.com/2013/12/create-state-machine-workflow-in-sharepoint-2013-using-visual-studio-2012/
    http://msdn.microsoft.com/en-us/library/ee231606.aspx
    I don't think that's very different using VS2013 or VS2012
    Best regards, Christopher.
    Blog |
    Mail
    Please remember to click "Mark As Answer" if a post solves your problem or
    "Vote As Helpful" if it was useful.
    Why mark as answer?

  • Relay Testing with State Machine

    Hi,
    Yesterday I very kindly had some help from "crossrulz" in setting out the following procedure.  Today, the National Instruments representative called and said I should implement my programme as a "State Machine", which I have attempted in the programme attached.  I was wondering how I might now implement the procedures 3 to 5 in this State Machine format as it seemed very complecated in the brief time we had. 
    What I am trying to do is test relays, using an automated test procedure.
    The procedure takes the following steps:
    1.       A NI9472  DO card and transistor drive turns the relay on/off via energising the coil (needs the time period to be variable).
    2.       Counts how may cycles the relay contacts have operated, this will easily be in excess of 100,000 cycles.
    3.       Every 100 cycles (again variable), the contacts are held closed, the load circuit (the current the relay is switching, which will be 15A at 30V) is disconnected, via another relay and a measurement is taken via a separate four wire method.  This consists of a 6V supply being placed across the contacts (switched in again via a relay) with a 1A current flowing through the contacts, the voltage drop across the contacts is then inputted into the NI AI NI9219 card (this is in the region of 10’s of mA) and is directly proportional to the contact resistance, which is what I want to measure.
    4.       The measurement is taken and stored and the measurement circuit disengaged, the load circuit re-engaged, and another 100 cycles is counted before the process goes back to stage 3.
    5.       This process goes on until the relay fails and hopefully a large set of contact resistance data is gathered.
    I have no real experience with NI Labview.  
    I have looked at the basic academic tutorials and have come up with the following programme for stage 1, however I can't get the DAQ Assistant to output every cycle
    Would this be a very difficult programme to implement for the novice?  The academic tutorials seem straight forward but when I try to do someting it seems very difficult.
    Hoping someone may be able to help, thanks
    Andy
    Solved!
    Go to Solution.
    Attachments:
    Relay Test State Machine.vi ‏207 KB
    Relay Test State Machine.vi ‏207 KB

    Hi James,
    I've tried to implement some logic as suggested.  I can now get the 1A coil to engauge after the nth cycle and I think it's taking a measurement, but can't seem to get the 15 A coil to disengauge at the same moment, which is crucial else the measurement will be across 16 A rather than just the 1 A.  Any ideas?  I just want to get it working so we can get started with testing.
    I'm going to get my supervisor to book me on a course at Newbury for future projects, it's very difficult to pick up of your own back.
    Kind regards,
    Andy
    (Helps if I attach it)
    Attachments:
    Relay Test State Machine.vi ‏209 KB

Maybe you are looking for

  • USB/Connections noise using Duet

    I am using a MacBook Pro, with the apogee Duet to record mostly guitar. I get a high pitch clicking/squelching noise, mostly audible with higher gain sounds, than clean. I am using a Dell 24 inch monitor, and 2 KRK monitors, and Logic Pro 8. But this

  • IMac Won't Start Up Normally

    I dont know what it is but when i power on my iMac it says "No Bootable Disc - Insert any Disc and press any key" or something along those lines... how do i get rid of this. its bothering me big time.

  • Control, Service and I/O Domains

    I was wondering what others have been doing regarding the setup of Control, Service and I/O Domains. I assume most combine the Control and Service Domain? The I/O Domain is another story or not? If my system has 2 I/O buses do you have 2 I/O Domains?

  • SES Cost not settling on REFURB Material in Refurbishment Process.

    Hi Experts I carried out a Refurbishment Process with Valuation Types. On the last part when i do a SES the cost of the SES is not settling to material wich has a valuation type REFURB. For the above one i created a material code with 3 valuation typ

  • MacBook Pro 2007 black screen nVida problem.

    After upgrading to Mavericks on my 2007 MacBook Pro. My display doesn't work anymore. I have a Black screen but computer is booting all the way to start up screen. I think it's the nVida problem. Any suggestions? I have done all resets and still not