We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,I created a new console demo to use json. The JSON likes this
{ "Id": "Test02", "Version": 1, "Description": "", "DataType": "WFC.Sample.WfData, WFC.Sample", "Steps": [ { "Id": "Hello", "StepType": "WFC.Sample.Steps.HelloWorld, WFC.Sample", "NextStepId": "WaitFor" }, { "Id": "WaitFor", "StepType": "WorkflowCore.Primitives.WaitFor, WorkflowCore", "NextStepId": "Decide", "CancelCondition": "data.Value1 != \"two\"", "Inputs": { "EventName": "\"MyEvent\"", "EventKey": "context.Workflow.Id" }, "Outputs": { "Value1": "step.EventData" } }, { "Id": "Decide", "StepType": "WorkflowCore.Primitives.Decide, WorkflowCore", "SelectNextStep": { "Print1": "data.Value1 == \"one\"", "Print2": "data.Value1 == \"two\"" } }, { "Id": "Print1", "StepType": "WFC.Sample.Steps.CustomMsg, WFC.Sample", "Inputs": { "Message": "\"Hello from print1 , dataValue1:\"+ data.Value1 + \", dataValue2:\" + data.Value2" }, "NextStepId": "Bye" }, { "Id": "Print2", "StepType": "WFC.Sample.Steps.CustomMsg, WFC.Sample", "Inputs": { "Message": "\"Hello from print2 , dataValue1:\"+ data.Value1 + \", dataValue2:\" + data.Value2" }, "NextStepId": "Bye" }, { "Id": "Bye", "StepType": "WFC.Sample.Steps.GoodByeWorld, WFC.Sample" } ] }
WfData class like this
public class WfData { public string Value1 { get; set; } public string Value2 { get; set; } }
The host codes like this
host.Start(); var wid = host.StartWorkflow("Test02", 1, new WfData{ Value1 = "two", Value2 = "data2" }).Result; Console.WriteLine("started..."); host.PublishEvent("MyEvent", wid, new WfData { Value1 = "two", Value2 = "data2" }); host.Stop();
when I set "Hello" to "Decide",everything is ok, and the console
started... Hello world Hello from print2 , dataValue1:two, dataValue2:data2 GoodBye world
when I set "Hello" to "WaitFor", console only
started... Hello world
what's wrong with the json ?
The text was updated successfully, but these errors were encountered:
I find the problem。 Error Json
{ "Id": "WaitFor", "StepType": "WorkflowCore.Primitives.WaitFor, WorkflowCore", "NextStepId": "Decide", "CancelCondition": "data.Value1 != \"two\"", "Inputs": { "EventName": "\"MyEvent\"", "EventKey": "context.Workflow.Id" }, "Outputs": { "Value1": "step.EventData" } }
True Json
{ "Id": "WaitFor", "StepType": "WorkflowCore.Primitives.WaitFor, WorkflowCore", "NextStepId": "Decide", "CancelCondition": "data.Value1 != \"two\"", "Inputs": { "EventName": "\"MyEvent\"", "EventKey": "context.Workflow.Id" }, "Outputs": { "Value1": "step.EventData.Value1" } }
Outputs.Value1 is string and step.EventData is object
Sorry, something went wrong.
No branches or pull requests
Hi,I created a new console demo to use json.
The JSON likes this
WfData class like this
The host codes like this
when I set "Hello" to "Decide",everything is ok, and the console
when I set "Hello" to "WaitFor", console only
what's wrong with the json ?
The text was updated successfully, but these errors were encountered: