Introduction
Custom Workflow is used to automate multiple actions on different BizTalk Artifacts at the same time in a single task configuration.
At times maintenance needs to be held for various reasons, such as application deployment, Windows patch updates, or infrastructure configuration upgrades. During the scheduled maintenance, administrators need to perform multiple tasks based on their BizTalk architecture model and business requirements. Disabling the host instances, receive location, and stopping the send ports, or enlisting the orchestrations are possible tasks. These tasks must be carried out according to a specific workflow. To handle this situation, administrators can schedule Automated Tasks – Custom Workflow or invoke the BizTalk360 Custom Workflow Tasks API Method from their BizTalk Automation framework, like Azure DevOps Pipeline, during application deployment or patching.
You can automate multiple actions by creating multiple steps. In each step, you can configure what action needs to be performed on which artifacts.
BizTalk360 Automated Tasks Custom workflow allows you to operate on the below Artifacts
Application - Start, Stop
Receive Location - Enable/Disable
Send Ports - Start, Stop, Enlist, Unenlist
Send Port Group - Start, Stop, Enlist, Unenlist
Orchestration - Start, Stop, Enlist, Unenlist
Host Instances - Start / Stop / Restart / Enable / Disable
NT Services - Start,Stop,Pause ,Resume,Restart
IIS App Pool-Start,Stop,Restart,Recycle
LogicApp-Enable,Disable,Run Trigger,Resubmit Runs
Predefined Templates
You can quickly create custom workflow actions using predefined templates. These templates serve as a quick-start guide, providing pre-configured settings and structures for common use cases such as shutting down all artifacts during maintenance, resuming artifacts after maintenance, restarting artifacts to process unhandled files, and freeing up disk space. Refer this article to understand more about predefined templates.
Custom Workflow Task Configuration
Navigate to Environment Settings->Automated Task ->New Task Configuration
In The New Task Configuration select Custom Workflow which will open the task configuration blade
Add the Task Name and Description
Task Type - Custom Workflow will be chosen by default, which you can't edit
Enable/Disable the task for execution. By default, the task execution will be enabled
Run this task immediately after saving - Enable this option to run the task immediately after saving the task configuration. However, the same task will execute again during the scheduled time.
Add Workflow Step- The workflow step can be created for Application Artifacts, Alarm, and PowerShell Script. Multiple actions can be triggered by creating multiple flows. you can create an up-to a maximum of 10 flows.
Application Flow
This flow helps to start or stop the BizTalk Applications
Select the application from the list and specify the action to perform i.e start or stop . Similar to admin console you can even specify how to start or stop the application. Enlist and start send ports, Start all receive location, Disable only receive location or disable and stop all the artifacts.
Artifact Flow
This flow helps to take action on Application artifacts and Host instances
Select the artifact type from the list and choose actual artifacts that need to be operated, and the action you wish to perform on the selected artifacts
Alarm Flow
This flow helps to take automatic action on Alarms
Select one or more alarms from the list and map the action to be taken say enable or disable
PowerShell Script
This flow helps to execute the PowerShell script on local or remote servers
Enter the server's name in which the script needs to execute and enter the script name, this may be the friendly name. In the script field enter the actual script you wish to execute
NT Services
Use the NT Service task to manage NT Services configured in BizTalk and SQL Servers.
Select the Server Type (BizTalk or SQL) and then the specific server. All available services for the selected server will be listed. Choose the required services and define the action — Start, Stop, Pause, Resume, or Restart.
IIS Application Pools
The App Pool task allows you to automate actions on IIS Application Pools.
Select the Server and choose the relevant Application Pools. Define the action to be performed — Start, Stop, or Restart.
Azure Logic Apps
This task allows you to automate specific actions in Azure Logic Apps directly from the monitoring setup.
Simply select the Azure subscription containing the respective Logic App, choose the Logic App name, and define the desired action — such as Run, Enable, or Disable.
Execute the next workflow step, even if the previous step fails - Enable this if you want to continue executing all the workflow steps even though any steps fail in between
Notification Configuration - Enable the channels in which you wish to get notified about the actions performed on Application Artifacts.
The below gif image goes through to configuring the Custom Workflow task to stop the specific ports and host instances during maintenance.

Handle the workflow’s overlap configuration with Alarms
If the artifacts you are trying to take action through the custom workflow are already mapped with a monitoring alarm with auto correction enabled, then an indication will be prompted to notify this during workflow configuration. You can decide whether you want to continue the configuration, or you want to disable the alarm during the task execution.
