Deactivate all triggers

Situation:

We have a monthly DR where we need to stop our Adeptia Kernel and WebRunner and JMS Queue but we want that we should deactivate all events before doing this practice. Actually what happened last time is some events were running while Adeptia shut down so to have a better performance we just want some script/code to deactivate events.

 

Tip:

 If you don't have a very large amount of triggers, we would recommend using the bulk de-activation option available for each type of trigger.

For a large number of triggers, we have exposed a Rest API to activate and deactivate Events which is very useful and by the help of which you can deactivate/activate the batch of events using a URL. Below is the format of URLs:

URL containing "serviceAction/activate"

http://<<ServerURL>>:8080/adeptia/serviceAction/activate/FileEvent?ids=<<CommaSeparatedEntityIDs>>&entityNames=<<EntityNames of Events>>&activateFlags=<<Set "false" to activate>>

eg: http://192.168.200.145:8080/adeptia/serviceAction/activate/FileEvent?ids=192168200145148794075076900280&entityNames=LSL_FileEventSample&activateFlags=false

URL containing "serviceAction/deactivate"

http://<<ServerURL>>:8080/adeptia/serviceAction/deactivate/FileEvent?ids=<<CommaSeparatedEntityIDs>>&entityNames=<<EntityNames of Events>>&activateFlags=<<Set "true" to deactivate>>

eg: http://192.168.200.145:8080/adeptia/serviceAction/deactivate/FileEvent?ids=192168200145148794075076900280&entityNames=LSL_FileEventSample&activateFlags=true

Note: Provide the appropriate required values in between <<>>. Hit this URL in that browser from which you are logged into Adeptia using admin so that it can use the same session.

You can also create a Rest consumer using this URL and can activate or deactivate events by executing a single flow.
 

Here are the high-level steps:
1. Create a Rest consumer with the URL

http://<<ServerURL>>:8080/adeptia/serviceAction/activate/FileEvent?ids=<<CommaSeparatedEntityIDs>>&entityNames=<<EntityNames of Events>>&activateFlags=<<Set "false" to activate>>

eg: http://192.168.200.145:8080/adeptia/serviceAction/activate/FileEvent?ids=192168200145148794075076900280&entityNames=LSL_FileEventSample&activateFlags=false


2. Create a Security Policy activity using Basic Authentication Option and Having User: admin(Adeptia User) and it's password. Use this in above created Rest Consumer.
3. Create a Process Flow using the Rest Consumer created in above step.
4. Create a Rest Provider.
4. Hit the Provider URL in a Browser.
5. The flow inside Adeptia will be triggered and will perform the action of Activate/Deactivate.

 

Note: For the Spazio event, you need to use the below URL:-

http://<<ServerURL>>:8080/adeptia/serviceAction/activate/SpazioEvent?activateFlags=<<Set "false" to activate>>&ids=<<CommaSeparatedEntityIDs>>&version=<<Version number of Spazio event>>entityNames=<<EntityNames of Spazio Events>>

eg: http://localhost:8080/adeptia/serviceAction/activate/SpazioEvent?activateFlags=false&ids=192168001180152629789959000003&version=1&entityNames=Spazio_event_QM2

Have more questions? Submit a request

0 Comments

Article is closed for comments.