Search found 11 matches

by kmoren
Thu 19 Jan 2012 21:13
Forum: dotConnect for Oracle
Topic: Documentation on Workflow Instance Store
Replies: 34
Views: 13784

Upon request we swapped out the DevArt instance store for the Microsoft sql version running in SQL Express (use Visual Studio for client management). The sql scripts are deployed with the framework in the framework 4.0 folder in sql/en.

We configured as follows ...

host.Description.Behaviors.Add(new SqlWorkflowInstanceStoreBehavior {
ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Oracle\development\Sprint2Application\NMD.Workflow\App_Data\InstanceStore.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True",
InstanceEncodingOption = System.Activities.DurableInstancing.InstanceEncodingOption.GZip,
InstanceCompletionAction = System.Activities.DurableInstancing.InstanceCompletionAction.DeleteAll,
InstanceLockedExceptionAction = System.Activities.DurableInstancing.InstanceLockedExceptionAction.BasicRetry,
HostLockRenewalPeriod = new TimeSpan(00, 00, 05), // seconds for host to extend lock lease else another host may gain lock to instance
RunnableInstancesDetectionPeriod = new TimeSpan(00, 00, 02) // seconds (runnable being not suspended, unlocked and expired timer, unlocked and Executing status, or has expired lock - raises HasRunnableWorkflowEvent
});


What we discovered is that with sql server instance store, it replaces the LockOwnersTable rows and when the host is running, if you run on the same machine all the time, you always have one row in this table but the Id, surrogateLockOwnerId and LockExpiration all increase with each replacement row. This is expected since you are running your workflows from the same machine each time. If it was a different machine (say in load balanced environment or due to server replacement), then you'd still have one row but the machine name would differ.

However, with the DevArt instance store, it doesn't seem to replace the rows in this table but simply appends new rows.
by kmoren
Thu 19 Jan 2012 21:07
Forum: dotConnect for Oracle
Topic: Oracle Tracking Participant (WF 4) Fails w/ key error
Replies: 9
Views: 48321

We implemented the suggested fix which fixed the custom tracking records issue but not the bookmark resumption issue. Bookmark resumption tracking records error out differently with this exception found in the WCF trace log (emitted by workflow service host)...

"An error occurred while calling tracking participants causing the
instance to be aborted. See the inner exception for more details.
System.NullReferenceException: Object reference not set to an instance of an
object.". at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
at
System.Activities.Hosting.WorkflowInstance.WorkflowInstanceControl.EndFlushT
rackingRecords(IAsyncResult result)
at
System.ServiceModel.Activities.Dispatcher.WorkflowServiceInstance.OnEndFlush
TrackingRecords(IAsyncResult result)
at System.Activities.Runtime.WorkItem.OnTrackingComplete(IAsyncResult
result)
--- End of inner exception stack trace ---
at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
at
System.ServiceModel.Activities.Dispatcher.ControlOperationInvoker.InvokeEnd(
Object instance, Object[]& outputs, IAsyncResult result)
at
System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeEnd(MessageRpc
& rpc)
at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage7(Mess
ageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean
isOperationContextSet)Syste
m.NullReferenceException, mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089Object reference not
set to an instance of an object. at
System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
at
System.Activities.Hosting.WorkflowInstance.WorkflowInstanceControl.EndFlushT
rackingRecords(IAsyncResult result)
at
System.ServiceModel.Activities.Dispatcher.WorkflowServiceInstance.OnEndFlush
TrackingRecords(IAsyncResult result)
at System.Activities.Runtime.WorkItem.OnTrackingComplete(IAsyncResult
result)System.NullReferenceException: Object
reference not set to an instance of an object.
at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
at
System.Activities.Hosting.WorkflowInstance.WorkflowInstanceControl.EndFlushT
rackingRecords(IAsyncResult result)
at
System.ServiceModel.Activities.Dispatcher.WorkflowServiceInstance.OnEndFlush
TrackingRecords(IAsyncResult result)
at System.Activities.Runtime.WorkItem.OnTrackingComplete(IAsyncResult
result)
by kmoren
Wed 18 Jan 2012 21:21
Forum: dotConnect for Oracle
Topic: Oracle Tracking Participant (WF 4) Fails w/ key error
Replies: 9
Views: 48321

Based on the Oracle error provided above, we put a trace on the bind variables coming in and discovered that when custom tracking records are enabled (codeProfile.Queries.Add(new CustomTrackingQuery() { ActivityName = "*", Name = "*" });) the record type name being passed in from the DevArt tracking participant is ReceiveMessageRecord instead of CustomTrackingRecord. As a result, calls to insert_custom_record funciton have the incorrect p_record_type_name which fails on the call within the function to p_record_id := insert_tracking_record(p_record_number, p_record_type_name, p_instance_id, p_trace_level,
p_event_time, p_annotation_key, p_annotation). Insert_tracking_record functions first statement is a select into of ( select seq_wf_tracking_record.nextval, type_id into p_record_id, p_record_type
from wf_record_type
where type_name = p_record_type_name;) which naturally fails because the wf_record_type reference table doesn't have a value of ReceiveMessageRecord
by kmoren
Mon 16 Jan 2012 21:54
Forum: dotConnect for Oracle
Topic: Documentation on Workflow Instance Store
Replies: 34
Views: 13784

LockOwnersTable

We have this working when imperatively (code) configured as seen below with a in our configuration file. The only problem that remains is that when a workflow completes, it leaves a record in LockOwnersTable and the workflow service host polling simply keeps extending the expiration date and not removing the record.

Code: Select all

 host.Description.Behaviors.Add(new OracleInstanceStoreBehavior
            {
                ConnectionString = "...";
                InstanceEncodingOption = InstanceEncodingOption.GZip,
                InstanceCompletionAction = InstanceCompletionAction.DeleteAll,
                InstanceLockedExceptionAction = InstanceLockedExceptionAction.BasicRetry,
                HostLockRenewalPeriod = new TimeSpan(00, 00, 01), // seconds for host to extend lock lease else another host may gain lock to instance
                RunnableInstancesDetectionPeriod = new TimeSpan(00, 00, 15) // seconds (runnable being not suspended, unlocked and expired timer, unlocked and Executing status, or has expired lock - raises HasRunnableWorkflowEvent
            });
by kmoren
Mon 16 Jan 2012 21:47
Forum: dotConnect for Oracle
Topic: Documentation on Oracle Tracking Participant
Replies: 2
Views: 1134

Please see forum thread @ http://www.devart.com/forums/viewtopic. ... highlight= for tracking related answers.
by kmoren
Mon 16 Jan 2012 21:28
Forum: dotConnect for Oracle
Topic: Oracle Tracking Participant (WF 4) Fails w/ key error
Replies: 9
Views: 48321

By trial and error and a little deductive reasoning, we determined that the tracking participant by DevArt doesn't support configuration based profiles. We suspected this because it doesn't support config based behavior extensions and behaviors for tracking, unlike it's instance store.

As a result, we turned to creating profiles imperatively in code and this worked, mostly. After this, we also discovered some documentation by DevArt on creating a tracking participant for a workflow application @ http://www.devart.com/dotconnect/oracle ... cking.html

What we have discovered is that the DevArt tracking participant works but not apparently for all tracking record types. We can get it to work for all tracking record types except custom tracking and bookmark resumption. Custom tracking is a key one for us since we need this to add additional dynamic metadata to our tracking for reporting purposes. Can DevArt please verify that custom tracking records are supported and tested and if so, help us to resolve the reason why the profile definition below fails to create custom tracking records with the error of

ORA-01403: no data found
ORA-06512: at "NMDR_WF.WF_TRACKING", line 17
ORA-06512: at "NMDR_WF.WF_TRACKING", line 331

ORA-06512: at line 2 at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Activities.Dispatcher.WorkflowServiceInstance.OnEndFlushTrackingRecords(IAsyncResult result)
at System.Activities.Runtime.WorkItem.OnTrackingComplete(IAsyncResult result)Devart.Data.Oracle.OracleException (0x80004005): ORA-01403: no data found
ORA-06512: at "NMDR_WF.WF_TRACKING", line 17
ORA-06512: at "NMDR_WF.WF_TRACKING", line 331
ORA-06512: at line 2

Code: Select all

TrackingProfile codeProfile = new TrackingProfile()
            {
                Name = "nmdTrackingAllViaCode",
                ImplementationVisibility = System.Activities.Tracking.ImplementationVisibility.All,
                ActivityDefinitionId = "*"
            };
            // TODO: use config value to determine profile queries
            codeProfile.Queries.Add(new WorkflowInstanceQuery { States = { "*" } });
            codeProfile.Queries.Add(new ActivityStateQuery { States = { "*" } });
            codeProfile.Queries.Add(new ActivityScheduledQuery());
            codeProfile.Queries.Add(new BookmarkResumptionQuery() { Name = "*" });
            codeProfile.Queries.Add(new CancelRequestedQuery() { ActivityName = "*", ChildActivityName = "*" });
            codeProfile.Queries.Add(new CustomTrackingQuery() { ActivityName = "*", Name = "*" });
            codeProfile.Queries.Add(new FaultPropagationQuery() { FaultSourceActivityName = "*", FaultHandlerActivityName = "*" });
by kmoren
Fri 13 Jan 2012 21:37
Forum: dotConnect for Oracle
Topic: Oracle Tracking Participant (WF 4) Fails w/ key error
Replies: 9
Views: 48321

Thanks. Regarding the tracking participant, we are investigating as well but it appears that another tracking participant supplied by Microsoft, workflowServiceTrace, may have been producing the above errors. We will follow-up.

However, it would be great to get more information on your tracking participant as tracking is vital. Also, does your tracking participant allow the profile(s) to be specified in the config file or must they be specified in code?
by kmoren
Wed 11 Jan 2012 23:13
Forum: dotConnect for Oracle
Topic: Oracle Tracking Participant (WF 4) Fails w/ key error
Replies: 9
Views: 48321

Oracle Tracking Participant (WF 4) Fails w/ key error

We altered our IIS hosting approach for the time being to accomodate the fact that the DevArt tracking participant isn't able to be config enabled (unlike the persistence instance store). To do this, each xamlx workflow service we created is file-less dynamic activated in our config file, , which calls a factory that is derived from the base workflow service host factory. This custom factory essentially adds the DevArt persistence and tracking components.

host.Description.Behaviors.Add(new OracleInstanceStoreBehavior
{
ConnectionString = "omitted;",
InstanceEncodingOption = InstanceEncodingOption.GZip,
InstanceCompletionAction = InstanceCompletionAction.DeleteAll,
InstanceLockedExceptionAction = InstanceLockedExceptionAction.BasicRetry,
HostLockRenewalPeriod = new TimeSpan(00, 00, 30),
RunnableInstancesDetectionPeriod = new TimeSpan(00, 00, 05)
});

OracleTrackingParticipant oracleTracking = new OracleTrackingParticipant("omitted;");
System.Activities.Tracking.TrackingProfile profile = new System.Activities.Tracking.TrackingProfile();
profile.Name = "nmdTrackingAll";
oracleTracking.TrackingProfile = profile;
host.WorkflowExtensions.Add(oracleTracking);

The instance store works this way but the tracking participant does not. When we run a workflow service from the WCF test client, the WF trace log indicates the following DevArt tracking participant error.

0: WorkflowInstance "WorkSpec V1 State Machine" is Started
1: Activity [null] "null" scheduled child activity [1] "WorkSpec V1 State Machine"
2: Activity [1] "WorkSpec V1 State Machine" is Executing
{
Variables
varWorkSpecSaidHandle: System.ServiceModel.Activities.CorrelationHandle
varWorkSpecSaid:
varWorkFlowInstanceId: 00000000-0000-0000-0000-000000000000
varWorkflowIsComplete: False
}
3: Activity [1] "WorkSpec V1 State Machine" scheduled child activity [3] "CancellationScope"
4: Activity [3] "CancellationScope" is Executing
5: Activity [3] "CancellationScope" scheduled child activity [5] "State Machine"
6: Activity [5] "State Machine" is Executing
7: Activity [5] "State Machine" scheduled child activity [53] "Initialize Instance (w/ endpoint)"
8: Activity [53] "Initialize Instance (w/ endpoint)" is Executing
9: Activity [53] "Initialize Instance (w/ endpoint)" scheduled child activity [61] "Initializer"
10: Activity [61] "Initializer" is Executing
{
Arguments
CorrelatesWith:
Parameter0: System.ServiceModel.Activities.CorrelationHandle
}
11: Activity [61] "Initializer" scheduled child activity [61.1] "Sequence"
12: Activity [61.1] "Sequence" is Executing
{
Variables
RequestMessage:
ReceiveNoPersistHandle: System.Activities.NoPersistHandle
}
13: Activity [61.1] "Sequence" scheduled child activity [61.6] "InternalReceiveMessage"
14: Activity [61.6] "InternalReceiveMessage" is Executing
{
Arguments
CorrelatesWith:
noPersistHandle: System.Activities.NoPersistHandle
Parameter0: System.ServiceModel.Activities.CorrelationHandle
}
15: WorkflowInstance "WorkSpec V1 State Machine" is Idle
16: Bookmark "Init|IInit" resumed with payload owner [61.6] "InternalReceiveMessage"
19: WorkflowInstance Aborted [WorkSpec V1 State Machine] Reason "An error occurred while calling tracking participants causing the instance to be aborted. See the inner exception for more details. InnerException Message: The given key was not present in the dictionary."

Is this a known issue and does DevArt have any guidance on configuring this participant in the event the above code base configuration of it is incorrect?
by kmoren
Mon 09 Jan 2012 22:27
Forum: dotConnect for Oracle
Topic: Documentation on Oracle Tracking Participant
Replies: 2
Views: 1134

Documentation on Oracle Tracking Participant

In addition to trying to use your oracle instance store, I'm also attempting to use your oracle tracking participant. As a reminder, we are building WCF workflow services hosted in IIS (as xamlx deployed files and also with workflowservice hosts initiated in the global.asax). I have the following web.config configuration that is failing with the error of ...

An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: Invalid element in configuration. The extension 'oracleTracking' does not derive from correct extension base type 'System.ServiceModel.Configuration.BehaviorExtensionElement'.

The configuration is as follows...

Code: Select all

        <add name="oracleTracking" type="Devart.Data.Oracle.ActivitiesTracking.OracleTrackingParticipant, Devart.Data.Oracle.WorkflowFoundation, Version=6.60.268.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
      </behaviorExtensions>
    </extensions>

        <oracleTracking profileName="nmdTrackingAll" connectionStringName="direct=true;data source=n.n.n.n;port=n;sid=...; user id=...; password=...;"/>
        </behavior>
      </serviceBehaviors>
When reflecting over the oracleTrackingParticipant class, I don't see any support for a behavior extension, which is required for anyone hosting such a workflow in IIS, WAS or AppFabric. DevArt is supporting an instance store that can be configuration only enabled and support these hosting options but the same treatment doesn't appear to be applied to the tracking participant. As you know, most all workflows will need to use both, with the tracking participant being even more widely used than the instance store.

Can a behavior extension also be added in the next release that will address the apparent missing tracking behavior extension along with the fixes to the configuration based instance store?

Also, is there any documentation for this tracking participant to enable / configure it in code and / or configuration?
by kmoren
Mon 09 Jan 2012 21:53
Forum: dotConnect for Oracle
Topic: Documentation on Workflow Instance Store
Replies: 34
Views: 13784

Documentation on Workflow Instance Store

Since this is a WCF workflow service hosted in IIS, we don't have a non-config file option of enabling the extensions and behaviors for the instance store and tracking.

BTW, DevArt hasn't provided an ETA on the fix and for those that can't wait for a declarative approach but need to host in IIS or AppFabric, here is what we've done so far to circumvent this issue. We basically used file-less dynamic activation for our workflow services and each activation uses a thin custom workflow service host factory that allows us to get a host (from the base) and then via code add extensions, behaviors and the like, including the DevArt instance store and tracking.

Code: Select all

<add relativeAddress="~/WorkSpecV1.xamlx" service="WorkSpecV1.xamlx"  factory="NMD.Workflow.NMDWorkflowServiceHostFactory" />
</serviceActivations>
</serviceHostingEnvironment>        
      
 public class NMDWorkflowServiceHostFactory : System.ServiceModel.Activities.Activation.WorkflowServiceHostFactory
    {
        protected override System.ServiceModel.Activities.WorkflowServiceHost CreateWorkflowServiceHost(WorkflowService service, Uri[] baseAddresses)
        {
            System.ServiceModel.Activities.WorkflowServiceHost workflowServiceHost = base.CreateWorkflowServiceHost(service, baseAddresses);
         
            WorkflowRuntimeBehavior runtimeBehavior = workflowServiceHost.Description.Behaviors.Find();
            if (runtimeBehavior != null) CreateRunTimeEventHandlers(runtimeBehavior);
            AddBehaviorsAndEndpoints(workflowServiceHost);

            return workflowServiceHost;
        }
This holds promise for us and allows us to use IIS and configure the DevArt stuff via code. BTW, the tracking participant from DevArt doesn't have any support to my knowledge for config based extension / behavior addition. It must be code declared.

BTW, use AppFabric is possible for your host if you have any Delays (durable timers) in your code. AppFabric (and Sharepoint) have windows services that stay alive to poll for the timer expirations and activate the persisted workflows. With IIS, you need to write your own windows service or use global.asax to create your workflow service hosts (without end points most likely) to do this polling and loading of instances on timer expirations.
by kmoren
Sat 07 Jan 2012 20:17
Forum: dotConnect for Oracle
Topic: Documentation on Workflow Instance Store
Replies: 34
Views: 13784

Using 6.60.28 But InstanceCompletionAction Error Still There

Using a WCF Workflow Service project (xamlx) hosted by IIS and in the web.config, the configuration of the persistence and tracking behaviors is...

Code: Select all

<add name="oracleInstanceStore" type="Devart.Data.Oracle.DurableInstancing.Configuration.OracleInstanceStoreElement, Devart.Data.Oracle.WorkflowFoundation, Version=6.60.268.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
<add name="oracleTracking" type="Devart.Data.Oracle.ActivitiesTracking.OracleTrackingParticipant, Devart.Data.Oracle.WorkflowFoundation, Version=6.60.268.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
</behaviorExtensions> 
and the actual behavior configuration is ...

Code: Select all

<oracleInstanceStore connectionString="<omitted>" instanceEncodingOption="GZip"
instanceLockedExceptionAction="AggressiveRetry" hostLockRenewalPeriod="00:00:30"
instanceCompletionAction="DeleteAll" runnableInstancesDetectionPeriod="00:00:05" />
<workflowIdle timeToPersist="0" timeToUnload="0"/>
<!-- Support workflow tracking -->
<oracleTracking profileName="nmdTrackingAll" connectionString="<omitted>"/> 
However, like others have reported for a few weeks, the persistence provider fails to initialize with the same error of ...

The default value for the property 'instanceCompletionAction' has different type than the one of the property itself.

When will this be fixed? It's urgent we be able to get this to work as using Oracle as our backing store is the only option and our workflow services can't progress until we have persistence.