Search code examples
amazon-swf

Settable Instance once set in First Workflow Execution is getting reused in next workflow executions


I implemented the SWF using spring in the same way as in the link below https://github.com/sprylab/aws-swf-spring-demo/blob/master/src/main/java/com/sprylab/aws/swf/AppConfiguration.java

I implemented the Workflow in the way given in the below link. https://github.com/ralph-tice/AWSFlowRecipes/blob/master/src/com/amazonaws/services/simpleworkflow/flow/recipes/waitforsignal/WaitForSignalWorkflowImpl.java

The issue that I'm facing is that, First time when I execute the workflow, the settable parameter is not set unless I call the signal method. But 2nd time onwards, when I execute a new workflow, I see that the settable is already Ready and has value which I set in the first execution.

I expected that the WorkflowImpl Instance would always be unique for each workflow execution, but I see that same instance is used for all workflow executions.

Can you please help me identify what is that I'm doing wrong here.


Solution

  • I got the issue,

    I was not doing this

    @Scope(value = WorkflowScope.NAME, proxyMode = ScopedProxyMode.TARGET_CLASS)