Software Development Network>> Windows Vista>> Can TargetStateName of SetState Activity be dynamically modified?
Further to that I would add,
If you want to do this functionality, the easiest way to do it is from a codeactivity - use the SetState method there.
Alternatively you could add the SetState shape dynamically at run time.(see lab11 in the WWF Hands on labs)I ran into the same brick wall earlier on in the piece.
No. Targetstate has to be set at designtime and cannot be changed after invoking the workflow instance.
- Vihang
Can TargetStateName of SetState Activity be dynamically modified?
Tutnik
Further to that I would add,
If you want to do this functionality, the easiest way to do it is from a code
activity - use the SetState method there.
Alternatively you could add the SetState shape dynamically at run time.
(see lab11 in the WWF Hands on labs)
I ran into the same brick wall earlier on in the piece.
CoolCoolMan
No. Targetstate has to be set at designtime and cannot be changed after invoking the workflow instance.
- Vihang
Kode Hunt
I publish my workflow as webservice. I add a CodeActivity between WebInputActivity and WebOutputActivity, and make the execute code as following:
WorkflowRuntime runtime = WorkflowWebRequestContext.Current.WorkflowRuntime;
StateMachineWorkflowInstance instance = new StateMachineWorkflowInstance(runtime, this.WorkflowInstanceId);
instance.SetState(newStateName);
But the application say error: 'Instance operation is not valid on workflow runtime thread'.
How can I handle it
Regrards,
ZhuangYicheng