locked
Promoting properties in SqlWorkflowInstanceStoreBehavior using web.config RRS feed

  • Question

  • Hi

    I know that we can initialize the sqlWorkflowInstanceStore using web.config for e.g.

    <sqlWorkflowInstanceStore
          connectionStringName="InstanceStore"
          instanceCompletionAction="DeleteAll"
          instanceLockedExceptionAction="BasicRetry"
          instanceEncodingOption="GZip"
          hostLockRenewalPeriod="00:01:00" />
    

    but is there a way using which we can promote properties thru the web.config file as well??

     

    Thanks

     


    Akshaya K Sharma
    Thursday, September 16, 2010 7:48 AM

Answers

  • Hi, Akshaya

    When we are using Workflow service, it seems not easy to promote data as we did in WorkflowApplication. one solution is adding workflow extension by activity. but is not good enough:
    http://xhinker.com/post/WF4Using-WF4-Customized-Extension.aspx

    After some trial, I found that the easiest way is creating a Activity to store data into database directly. no need to use extension, no need to use participant.

    Regards
    This posting is provided "AS IS" with no warranties, and confers no rights. Microsoft Online Community Support. My Blog:http://xhinker.com
    • Marked as answer by Andrew_Zhu Thursday, September 23, 2010 7:00 AM
    Monday, September 20, 2010 9:19 AM
  • Hi,Akshaya

    ->"Yes, I was able to solve the problem by the Customized Extension workaround. But I do not understand why you say that "The workflow extension is not good enough", please explain."

    It is fine if you are comfortable with customized extension.  I said that workflow extension is not good enough because extensions add additional complexity to your system. after creating some workflows and workflow services I found that if we use only activities, we can keep workflows simple and flexible. After all, it all up to you.

    ->"On other hand, I think an activity that stores data in the db directly which is only required as long as the lifetime of a given workflow will actually be an overhead and is unnecessary since the data is temporal, please correct me if I am wrong."

    I am not sure which kind of workflow you are creating. some times, when a workflow instance is persisted and unloaded from runtime, client system still need to query some data about the workflow, So, we should promote/open/publish/let some workflow info for querying. that is why we store additional data in db right before workflow is persisted.

    Hope this helps
    Regrds


    This posting is provided "AS IS" with no warranties, and confers no rights. Microsoft Online Community Support. My Blog:http://xhinker.com
    • Marked as answer by Akshaya Sharma Thursday, September 23, 2010 7:57 AM
    Thursday, September 23, 2010 6:33 AM

All replies

  • Hi, Akshaya

    When we are using Workflow service, it seems not easy to promote data as we did in WorkflowApplication. one solution is adding workflow extension by activity. but is not good enough:
    http://xhinker.com/post/WF4Using-WF4-Customized-Extension.aspx

    After some trial, I found that the easiest way is creating a Activity to store data into database directly. no need to use extension, no need to use participant.

    Regards
    This posting is provided "AS IS" with no warranties, and confers no rights. Microsoft Online Community Support. My Blog:http://xhinker.com
    • Marked as answer by Andrew_Zhu Thursday, September 23, 2010 7:00 AM
    Monday, September 20, 2010 9:19 AM
  • Hi Andrew

     

    Yes, I was able to solve the problem by the Customized Extension workaround. But I do not understand why you say that "The workflow extension is not good enough", please explain.

    On other hand, I think an activity that stores data in the db directly which is only required as long as the lifetime of a given workflow will actually be an overhead and is unnecessary since the data is temporal, please correct me if I am wrong.

     

    Thanks for your help.


    Akshaya K Sharma
    Tuesday, September 21, 2010 12:35 PM
  • Hi,Akshaya

    ->"Yes, I was able to solve the problem by the Customized Extension workaround. But I do not understand why you say that "The workflow extension is not good enough", please explain."

    It is fine if you are comfortable with customized extension.  I said that workflow extension is not good enough because extensions add additional complexity to your system. after creating some workflows and workflow services I found that if we use only activities, we can keep workflows simple and flexible. After all, it all up to you.

    ->"On other hand, I think an activity that stores data in the db directly which is only required as long as the lifetime of a given workflow will actually be an overhead and is unnecessary since the data is temporal, please correct me if I am wrong."

    I am not sure which kind of workflow you are creating. some times, when a workflow instance is persisted and unloaded from runtime, client system still need to query some data about the workflow, So, we should promote/open/publish/let some workflow info for querying. that is why we store additional data in db right before workflow is persisted.

    Hope this helps
    Regrds


    This posting is provided "AS IS" with no warranties, and confers no rights. Microsoft Online Community Support. My Blog:http://xhinker.com
    • Marked as answer by Akshaya Sharma Thursday, September 23, 2010 7:57 AM
    Thursday, September 23, 2010 6:33 AM
  • I understand. Thank u very much for the explaination.


    Akshaya K Sharma
    Thursday, September 23, 2010 7:57 AM