I am planning to use Windows Workflow Foundation 4.5.
I need to track information in a custom database.
Lists will be shown in a user interface (my tasks, all tasks).
What is the best way to have a generic system by which I don't need to add custom activities to a workflow.
workflow created
workflow ended
workflow terminated
receive activity started (log custom record in a table)
receive activity completed
--> bookmark events?? I also need to correlate an activity instance id with the record in the database.
...
Do I use a tracking participant for this or can I tap into the events of the workflow service host??
You don't need to add custom activities to your workflow. You can implement SQL tracking participant. Here is a sample: http://msdn.microsoft.com/en-us/library/ee622983.aspx
Tracking participant is the solution to choose here... it is really flexible. You can get the status of the workflow instance with the WorkflowInstanceRecord and the activity status with the ActivityStateRecord. Both records have the instanceId to correlate them.
Also you can track custom tracking in your code activities with the CustomTrackingRecord.
We are using it for long time and the performance is quite good.
I hope it helps.
Related
I am new to IMIS which is an Engagement management system with membership handling inbuilt. I need some inputs about the business process automation in IMIS. I see IMIS does not allow creating stored procedures to clients using IMIS cloud hosting. This seems to be a concern as every business has simple to complex processes and many processes updates data too. I am surprised to see that IMIS does not have a proper workflow builder (GUI based) where one can select as if some Business object is updated/created or have some value X then "update" some other business object/data i.e update the database table with specific values.
Best example if I want to use a custom Membership numbers (autonumbers) then I cannot do that. I cannot update table data via IMIS "process automation". IMIS "process builder" offers very limited functionality. It do allows calling stored procedure via it but what is the use of it as we cannot create a stored procedure in IMIS. IMIS does allow calling 3rd party REST api via process automation too for particular trigger. With in IMIS there is no way to add custom code handling or custom process handling or a UI based workflow with if/else (a BPM which is available in Salesforce, Zoho and other CRM).
SO I want to know if there is any IMIS consultant here then please guide me how do you suggest handling complex business process automations ? I know IMIS allows REST API but that means I need to write a custom code to handle the process automation and it also means I need to do it outside of IMIS cloud. I just need a confirmation that business process need to be handled via customization outside IMIS through an external system. The external system will get data from IMIS, make the data changes and push it back to IMIS via API. I can build it but before doing so I am trying to make sure I am not missing something which is inside in IMIS (99% sure it cannot be done inside IMIS)
I also believe IMIS does not have webhooks as well as there is no menu to configure the same in IMIS. Please guide on this.
Please do not point me back to "process automation" menu or feature of IMIS as I am aware of it and its limitation too. I have explained its limitation above after checking with the IMIS support desk.
Nope, you can't do complex workflows in iMIS cloud (yet, as of July 2022). No web hooks either. Both of these requirements can be covered with a cloud based RPA solution.
I'm trying to build a service, which will monitor the current system state in graph structure. For example, if userA is subscribed on userB and have a chat with it, the graph should contain next relations:
A --subscribed on --> B
A --in chat with --> B
B --in chat with --> A
If userA exit chat, then the relation should be deleted.
Also, new microservices should be introduced, so no hardcoded decision (like to support subset of relations) cant be implemented.
Main problems are consistency of data and new relations which cannot be hardcoded.
I wonder if there are any solutions, or libraries, which can help me with this problem. Any suggestions will be appreciated.
It sounds like your system should support an event driven architecture. For example any action that is potentially relevant to other parts of the system should be logged in an event queue. So now whenever your graph service is ready to update, it can read the event queue to the end and update its own state. This would be a solution that is decoupled as much as possible and resilient to data loss or other potential issues.
Typically people use a technology like Apache Kafka to realize a simple, lightweight, fast event queue for such purposes. It allows you to define queues, called topics, and consumers that process the topics. See the docs.
I'm trying to build a web app that lets a user create a session which generates a unique session ID through which other users can join the session and post messages on a board. However, I am stuck at real-time updates for the specific sessions as I am unaware of technologies that allow me to accomplish this task. I've read about .NET's SignalR as a real-time web app API but so far have not found a way to handle each session separately. I am looking for recommendations and preferably tutorials on how to implement this feature.
The Web API is built in Spring Boot and .NET, so I would prefer APIs/tutorials for these frameworks. Thank you.
Just thinking of the easiest way to do this with minimal strain on the server. I think I would go down the road of storing the session IDs in the db and then use ajax to handle the realtime updates. Ajax can run on a js timing loop that can check a serverside flag which is set once updates are made to the db. Upon finding a set flag the ajax can then pull in the updates or do a page refresh.
I was wondering if there are any good tutorials or videos for beginners on Windows workflow 4 and how you can you a use a workflow within an asp.net page?
I want to create a basic example page that will ask the user a question and based on their answer (using a workflow decision tree) the relevant next question will be displayed.
Is this even possible?
Thanks.
Yes you can do such example, but the approach is slightly different.
Create a workflow service with multiple receive response activities. All receive activities are related to context correlation.
Use a question data base and get current question forn database and render it.
Start button on Asp.net page start workflow service.
Workflow Service waits for input on each receive activity and use input through submit button.
Workflow activity put next question for current user in db.
We have a rather large document routing framework that's currently implemented in SharePoint (with a large set of cumbersome SP workflows), and it's running into the edge of what SP can do easily. It's slated for a rewrite into .NET
I've spent the past week or so reading and watching WF4 discussions and demonstrations to get an idea of WF4, because I think it's the right solution. I'm having difficulty envisioning how the system will be configured, though, so I need guidance on a few points from people with experience:
Let's say I have an approval that has to be made on a document. When the wf starts, it'll decide who should approve, and send that person an email notification. Inside the notification, the user would have an option to load an ASP.NET page to approve or reject. The workflow would then have to be resumed from the send email step. If I'm planning on running this as a WCF WF Service, how do I get back into the correct instance of the paused service? (considering I've configured AppFabric and persistence) I somewhat understand the idea of a correlation handle, but don't think it's meant for this case.
Logging and auditing will be key for this system. I see the AppFabric makes event logs of this data, but I haven't cracked the underlying database--is it simple to use for reporting, or should I create custom logging activities to put around my actions? From experience, which would you suggest?
Thanks for any guidance you can provide. I'm happy to give further examples if necessary.
To send messages to a specific workflow instance you need to set up message correlation between your different Receive activities. In order to do that you need some unique value as part of your message data.
The Appfabric logging works well but if you want to create custom a custom logging solution you don't need to add activities to your workflow. Instead you create a custom TrackingParticipant to do the work for you. How you store the data is then up to you.
Your scenario is very similar to the one I used for the Introduction to Workflow Services Hands On Lab in the Visual Studio 2010 Training Kit. I suggest you take a look at the hands on lab or the Windows Server AppFabric / Workflow Services Demo - Contoso HR sample code.