JBPM 7.31, automatically skip human task after due date - process

in JBPM is it possible to automatically skip a human task after the due date?
This is an example of my process
In task 'Evaluation' the user can ask for a Contribution, in this case the next task will be 'Contribution'.
The task 'Contribution' has a sla of 2 day.
After this period the process must automatically return to task 'Evaluation'.
Is this possible?
Thanks

Try using TimerBoundaryEvent for Contribution task. Define 2 day sla at TimerBoundaryEvent if UserTask is not completed in 2 days, task will be cancelled and process flow can continue to Gateway or other tasks.

Related

Unique ID for TaskItem in Outlook

I'm importing all the tasks from outlook into a database.
To flag those that are different since the last import I need a unique ID for each task item object that does not change.
I've looked at TaskItem.EntryID. The microsoft documentation says it's only unique to each storage location which is fine as these tasks won't be moved.
The trouble is with recurrences:
I make a recurrent task due on 28/05/2019 which has an ID of ..D890000
I complete the task and outlook creates the new task for the next scheduled day.
The original task for 28/05/2019 now has a DIFFERENT ID of ..D8A0000
The new task for 29/05/2019 has the original ID of ..D890000
I have also tried using PR_SEARCH_KEY which is the same across these tasks.
Would anyone be able to tell me how to get a unique ID for each TaskItem that persists.
Or would you be able to confirm that the only time it will change is in the event of recursive tasks?
Many Thanks
It works as expected - when an instance of a recurring task is completed, Outlook creates a completed task for the current date and advances the existing recurring task to the next day while decrementing the recurrence count.

How to pass current time to recurring Hangfire job?

I have a recurring Hangfire job that runs daily. As part of the logic the job fetches entities created within the last 24 hours. It uses DateTime.Now in the logic. I realize that this is not a robust design in the case that the job fails and it is run several days later. Is there any way I can pass the current time as a parameter to a recurring job? Or do I need to rewrite the logic to be independent of the current time? I have tried RecurringJob.AddOrUpdate(() => FooAction.Execute(GetTime()), cronSchedule); but as expected that just always passses the time that the recurring job was created.
One idea would be to skip the recurring job and create a regular Hangfire job instead. The last thing the job should do is create a new job and pass the specified time as parameter. But I would prefer to use a recurring job if I can.
"You could have a recurring job run that is responsible for creating non-recurring jobs, and passing the current time into those."
From comment by #mason.

Hangfire - How does it handle last couple of days of the month?

I have a UI where users select on which day of each month they want to receive an email. What happens if they select the 31st? How does Hangfire handle the days which have only 30 day or february?
Thank you!
In case anyone comes back to this - this limitation was lifted in Hangfire 1.7 when they migrated to Chronos for recurring CRON expression support.
According to this issue, Hangfire lacks the capability to schedule any job for the last day of the month.
Hangfire use NCrontab, that's not support for # or L
Your best bet (at the moment) is to:
Schedule multiple jobs manually (using calendar to figure out last day of the month or other methods to figure out days in a month)
Not use Hangfire (use something that is more capable in terms of cron type scheduling)
FluentScheduler does have support for LastDayOfTheMonth
Schedule(() => Console.WriteLine("This task will run at last day of every month."))
.ToRunEvery(1)
.Months()
.OnTheLastDay();

How to handle task that is repeated through a month with camunda

I'm new to Camunda and didn't find any tutorial or reference explaining how to achieve the following:
This is a workflow to monthly hour registry. So an employee should compile a "form" task to insert how many hours he has worked every day in the month and save it on a sheet for example. At the end of the month the account take the sheet with the hours and make a kind of report for each employee.
Is it possible to handle this kind of recursion (do a task once a day into the month) with camunda and any idea how to make it with a bpmn graph?

Scheduling job in sql server mgmt studio to run for 'x' days in a month

How do I run a job in Sql Server Agent in (SQL Server Management Studio) for 'x' number of days in a month?
eg: Every 1st.2nd and 3rd of every month
The problem is I am not sure of these days! The user will specify the 'x' number of days!
For instance, the user feels for the month of April he wants the job to be scheduled on 'x' days. Here x= 1st,2nd and 4th of April.
And for the month May he feels to schedule on 'x' days. Here x= 7th,8th and 10th!
Is it possible to schedule in such a way?
Is there any script to schedule this???
Make a schedule that's run on those three days. Assign this job to that schedule.
(To elaborate and make it perfectly clear).
Make three schedules (Rightclick Jobs, Manage Schedules).In new schedules choose - Recurring on monthly. One starts the 1st, one starts the 2nd, one starts the 3rd of every month (for example, or x times for whatever day of month you wish).
Name these schedules something that's easy for you to spot in a list.
On the job you wish to run on these days, properties on it, schedule, then pick the schedule(s) you want to assign to the given job.
That should be all.
If the schedule is user defined then I'd probably just schedule the job to run every day and have the first step be to check whether it should be running today and if not exit.
Check Howto Schedule a Job and follow the Instructions of cairnz.