Terminate the workflow at specific time without message box


#1

I want to terminate the workflow without message box. Currently I am getting message box after terminatation.I want to terminate or stop the workflow at specific time. How can i do that?


How to terminate workflow without the pop out message?
#2

Have you tried “Terminate Workflow” activity under Workflow/Error handling?
See: https://msdn.microsoft.com/en-us/library/system.activities.statements.terminateworkflow(v=vs.110).aspx

Adrian.


#3

I have used TerminateWorkFlow only.It is terminating the flow but after termination giving me the message box
But I do not want message box to be displayed after terminating.


#4

Then you can put everything inside a try / catch and at the point where you want to stop just throw an exception.
In the catch just do nothing and the workflow will exit normally.

Adrian.


#5

Can you please give me an example. I have used Throw activity but what should i enter in Exception proeprty


#6

Thorw doen’t terminate the workflow.Basically I want to terminate the workflow at specific time to stop the process.


#7

Hi All,

Even i want to terminate my workflow in between of some operations. Could anyone help me please.

Many Thanks,
Balakrishna Reddy


#8

use try-catch…Pass terminate workflow activity in it.


#9

this is not working… Message box is shown as above. I don’t want message box to appear.
How this Terminate Workflow is used without message box being popped up?


#10

Then why this Terminate Workflow activity is introduced ? and for what purpose?


#11

Can you try this inside Invoke Workflow Activity?

Target Object : System.Diognostics.Process.GetProcessesByName(“UiRobot”).First(Function§ String.IsNullOrEmpty(p.MainWindowTitle) = false)
Method Name: Kill or CloseMainWindow


#12

I want to understand the functionality of Terminate workflow activity and how we can utilize it to stop the workflow without a popup message box.


#13

see this screenshot.

Now in catch, do not print any exception message… only the text you want to print…e.g. “Error found in RZ20 T-code” something… and then use terminate workflow activity PRIVATE. It will definitely work. If you dont wanna print any error, then you can use directly workflow activity (PRIVATE).


#14

HI Chand,

I tried what you have suggested, still the pop up appears.

Attached are the screenshots. I have added a try catch block. Thrown an exception in try and caught that exception in Exception block, set the required properties as you mention. Still the pop up box.

Kindly check and confirm.


#15

you have 3 exception mentioned in catches and your trying to terminate the workflow without passing any exception type in “exception” field in the property.
please pass the value and try.


#16

In all the exception blocks I have added the exception object.
Now, I have removed 2 exceptions and kept only 1 exception (with exception object). Still the pop up comes up.


#17

Hi,
Exception field of "Terminate workflow is still kept empty.
Please pass the exception variable there.


#18

Oh, I thought either Exception or Reason property should be set. Well, I set the exception property now. (This terminate workflow is already in catch block.)


#19

exception name you declared in the catch block is “exception” not "New Exception"
please pass “exception” in the property …:upside_down:


#20

Tried with that also. No luck .

Can you create a simple workflow for this Terminate Workflow and attach it here so that I will test ?