How to stop the process?

Hello all,

I need build a logic for below things:

Bot will ask the end time to the end user to enter in input dialogue box in 24 hours for example 13:30,
if the end time is over than bot should stop the process and send an email in the end state to business
If the end time is not over the bot should continue with the actual process

How to do this??

@naveen.s Are you using a RE Framework? means your process is transactional based If yes then you can follow the same…!

In initialization state put a Input Dialog Box Activity, create a output variable, which will store the user input in String Datatype.

Suppose User will enter end time: 13:30

Then, In Get Transaction state where you are assigning transaction item, put an if activity condition:

Now<DateTime.ParseExact(str_UserInput,"HH:mm",System.Globalization.CultureInfo.InvariantCulture)

Note: User should pass input time in correct format.

As you can see in below image current time was 14:05 and in input we passed 13:30 that’s why we got output as false. and execution will go to end process state, as no Transaction_Item value will be assigned.

Hope your query is cleared now!

Best regards,
Ajay Mishra

Can you please show with workflow where exactly I need to place that condition in get transaction state??

@naveen.s Send me a screenshot of your Get Transaction.xaml, where you have used Get Transaction Activity

Okay will send it tomorrow, Just now I logged out

@naveen.s

Place an If activity above the Get Transaction Activity, using the specified condition.

Now<DateTime.ParseExact(str_UserInput,"HH:mm",System.Globalization.CultureInfo.InvariantCulture)

Then, move the Get Transaction Activity into the Then Block.

In Else Block: Assign

outTransactionItem = Nothing

As long as the condition remains true, the bot will fetch transactions from the queue. However, once the current time exceeds the user-defined input time, the condition will become false. At that point, the execution will move to the else block, and no new transactions will be fetched from the queues. The process will then proceed to the end state.

I hope this will resolve your issue!

Best regards,
Ajay Mishra

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.