Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have created WOrkflow Service Project having parallel workflow in it that have state machine (for creating new workflow) and while activity for fetching workflow status. i have used page url and current state variable at global level , which are set by state machine as per state and used by other activities say GetWOrkflowStatus in its response. ..

while calling workflow i passes SIte Id, RequestId and so on..


i have used below code to call the service and all are workfind fine....
C#
private IWorkflowservice GetServiceFromChannel()
{
    BasicHttpBinding myBinding = new BasicHttpBinding();

    EndpointAddress myEndpoint = new EndpointAddress("http://localhost:64905/Service/Service1.xamlx");

    ChannelFactory<ServiceContract.IWorkflowservice> myChannelFactory = new ChannelFactory<ServiceContract.IWorkflowservice>(myBinding, myEndpoint);


    return myChannelFactory.CreateChannel();
}

/// <summary>
/// Create New Workflow Instance
/// </summary>
/// <returns></returns>
public ActionResult Create()
{

    IWorkflowservice service = GetServiceFromChannel();

    RequestId = Guid.NewGuid();

    WorkflowRequest requestData = new WorkflowRequest();
    requestData.RequestID = RequestId.ToString();
    requestData.SiteID = 123;

    WorkflowResponce response = service.InitiateWorkflow(requestData);


    RequestDataModel model = new RequestDataModel();
    model.RequestId = RequestId;
    model.Message = GetMessage(response);


    return View(model);
}



public ActionResult GetStatus()
{
    IWorkflowservice service = GetServiceFromChannel();

    WorkflowRequest requestData = new WorkflowRequest();
    requestData.RequestID = RequestId.ToString();

    WorkflowResponce response = service.GetWorkflowStatus(requestData);

    RequestDataModel model = new RequestDataModel();
    model.Message = GetMessage(response);
    model.RequestId = RequestId;

    return View(model);
}




i am facing problems in following cases:
1. Get all workflows with are in specified State and in Specified Site. returned Data must contain Request Id and page url(global variable)
i have tried various tracking but all no luck..

please suggest something helpful. thanks in advance..
Posted
Updated 15-Mar-14 4:01am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900