I advancing learning about JBPM 5 and Drools flows. I have successfully setup a User Registration process and managed to run it as a web application. The process looks is shown below
You can check out the screenshot here [http://i.stack.imgur.com/y7JZ1.png]
What i want to do right now is, before reaching the User Task node where the user verifies his email, i need to send him a link in the Email task. The link must take the User TaskID (primary key), so that when the user clicks on the link, i can complete the task using the TaskID supplied in the URL.
My worry now is, the User task node is reached only after the email is sent. Therefore the Task is not yet created in the database. Is there any alternative way of doing this.
Or
If i can send a mail after reaching the User task, how can i get the primary key of the User Task??
Please help.
You should try with the onExit and onEntry extensions attached to the User Task node and remove the Email node. In that way as soon as the process reaches the Task Node you can get the work Item Id (something like the nodeId) that you can use to query the Human Task component to find the task associated with that node to complete it.
Cheers
Related
I want to send mails to user when his asset gets unpublished using the OOTB feature.
So, after I configure the Day CQ Mail Service and add email ID to the user details, is there anything else that I need to do? Or will the user automatically receive the email?
You can configure a workflow launcher to run on publish with the event type "node removed". In your workflow model you are going to check if the deleted node is a dam resource and if so, the next step is to configure an email step to send an email to your preferred user. The user and his email should exist on publish. If your users exist only on the author instance, you need a custom step with some kind of publish author notification mechanism or alternativ reverse replication.
This is a 2 part issue:
How to move/delete a file after processing. Currently we can only copy, but the original file remains in the source. Ideally we don't want to add a separate process to get metadata and compare if processed or not. I have been following one blog that asks to use a WEB activity and the Delete Rest API. I have gotten to that point, but I am not able to understand/follow instructions on to obtain the ACCESS TOKEN. It shows Curl steps, if someone can help on this would be great.
I have created a pipeline, that has 4 Main activities. As part of this pipeline I want to be able to send email notifications for Success and failure.
Each success of an activity moves to the next activity, but if any activity fails it will send email. I Want to be able to have one SUCCESS or FAILURE Notification and dynamically add content to email instead of sending email on previous activity. For Failure it seems like I have to create a separate web activity for each activity to align a Failure, which is not elegant.
Based on how the WEB activity is set to use the logical apps for email, we have to define the activity name that the email is associated with (at least based on my understanding). So i created a separate WEB activity for each failure email, not very elegant.
Does anyone have a better way to handle.
enter image description here
enter image description here
The only alternative is using a logic app to delete blobs, you can trigger the logic app also via a Web activity. Can you share the blog URL for the delete via web?
As for the email on failure, the issue is that you cannot have 'or' dependencies in the pipeline. A workaround that I'm using is to introduce a variable, when an activity fails or when the pipeline is finished, it sets the variable. In parallel in the pipeline I have a while activity that checks this variable. When it gets a certain value an action will be triggered. Also not elegant, but you don't need a lot of Web activities this way.
Let me explain the scenario. I want to start a workflow instance which will create a request approval process. There are different levels and each level has approvers and specific time is assigned for each level. An approver should approve within the given time to complete process or he/she may be alert again to approve once the assigned time of the level is over.
A user may request something by starting a approval process this would intiate a workflow which will create a workflow instance for the specific request. when the process starts it will inform the respective approvers in first level to approve the request made by a user. if a approver failed to approve within the given level time the approver will be alerted to approve the request and it should pause the workflow and wait for it. if he managed to approve the request the process should moved to the next level and continue with the same process until the number of levels are over.
Can i do this using windows workflow foundation. I read and understood that invoking a workflow, bookmarks can be used for this. i need to how can i manged the background timer for each level and alert the users. im stucked at that point please help me.
if there is a better solution please feel free to talk :).
Yes you can achieve this by using a Pick activity which has a timer (delay) activity and your custom approval activity inside. Pick activity will choose only one PickBranch to complete when ever either of the contained activity is completed. That said if the timer activity is triggered, the custom approval activity will be cancelled then. And you can choose to do what ever you what to do afterward such as sending emails to notify the involved approvers that the task was expired. WF has a lot of potential but it seems this technology has been left in the corner by its vendor for a while...
I've build a simple task management webapp: User A fills up a form, hits submit button, sends data to a server and if the data validates User B gets assigned to this task.
I'd like to notify User B by email on this new assignment. However User A can alter the task data or even delete the task and the email that already has been sent would be incorrect in this case.
One approach is to delay the notification email for couple of minutes and then upon sending update the email message if needed.
Which are the best practices for notifications sending?
I think you have a few choices:
Send out emails whenever task status changes. Don't include details; send a link to user B to let them see what the changes are.
This is a good example of Why Starbucks Does Not Use Two Phase Commit. User B will tolerate "dirty reads" because they aren't life altering.
Send out all notification emails asynchronously on a fixed schedule. Have a timed task query a database, generate all the emails, and send them at once. The task will have the chance to only send the latest one. If user A assigns a task, makes updates, then deletes, user B will only get the last meaningful one. In this case, an assign followed by a delete might result in no email being sent. Only an assign or update as last state will result in an email being sent.
How to Resume the Persisted Workflow with Delay Activity without Reloading into memory:
I am creating a workflow for leave application. My requirement is if any participant is not responded in the specified time, then the request needs to pass to next level participant approval.
Suppose a requester submitted a Leave Request and the Team Lead needs to approve it within 7 days. If the Team Lead is not responded in 7 days, then automatically it has to go to Manager Approval.
In general to achieve this, we will write a Windows service which is checking periodically and send the notifications once the period is elapsed.
But I want to achieve without writing the Windows service. Is there any possibility in WF4.0.
I am trying like this, once the requester is submitted the request then I am showing the request in the participant mail box and persisting the workflow. Once the participant responded I am resuming the workflow (because I am saving the workflow instance ID) and passing the participant response for further workflow execution.
In this if the participant is not responded, how to escalate / send the request to manager without using windows service.
Is it possible to do with anything with the Delay Activity?
If you create a workflow service it is hosted in the WoskflowServiceHost and this periodically checks is there are expired timers and resumes those.
You must host the workflow engine somewhere ...
If it's not in a windows service, it should be in IIS.
You can also host it in a "normal" command line application, but if you close the application the workflow will stop.