> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flexagon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# createOrUpdateWorkManagers

> Creates or updates Work Managers defined by properties files. The properties files will be processed for property replacement using $\{\{VARIABLE\ NAM

Creates or updates Work Managers defined by properties files. The properties files will be processed for property replacement using \$\{\{VARIABLE\_NAME}} format. See [Property Replacement Support](https://docs.flexagon.com/flexdeploy-11-2-documentation/flexdeploy-variables-guide/property-replacement-support.md) for more information about property replacement.

If using multiple files, make sure that the lists contain unique values across files.

> [!TIP]
>
> If you want to detect changes in WebLogic resource (properties) files and only deploy changed files, you can implement custom workflow as defined in [Custom Workflow to detect changes in Properties Files](https://docs.flexagon.com/hidden-fd112/appendix-weblogic-plugin-guide/custom-workflow-to-detect-changes-in-properties-files.md).

# Blog Posts

* [https://flexagon.com/2018/04/yes-you-can-create-work-managers-reliably-with-flexdeploy/](https://flexagon.com/2018/04/yes-you-can-create-work-managers-reliably-with-flexdeploy/)

# Target Properties

<table><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><th>**Property Name**</th><th>**Property Code**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>Oracle Weblogic Home (WL\_HOME)</td><td>`FDWLS_WEBLOGIC_HOME`</td><td>Yes</td><td>WebLogic Home Directory. (e.g. /u01/oracle/products/fmw/wlserver)</td></tr><tr><td>Weblogic Domain Name</td><td>`FDWLS_DOMAIN_NAME`</td><td>Yes</td><td>WebLogic Domain Name.</td></tr><tr><td>Weblogic Admin Listen Address</td><td>`FDWLS_ADMIN_LISTEN_ADDRESS`</td><td>Yes</td><td>The listener address of the WLS admin server. (e.g. localhost)</td></tr><tr><td>Weblogic Admin Listen Port</td><td>`FDWLS_ADMIN_LISTEN_PORT`</td><td>Yes</td><td>The port of the WLS admin server. (e.g. 7001)</td></tr><tr><td>Weblogic Admin SSL Connection</td><td>`FDWLS_ADMIN_USE_SSL`</td><td>No</td><td>Indicates whether the admin server is using SSL.</td></tr><tr><td>Weblogic Admin User</td><td>`FDWLS_ADMIN_USER`</td><td>Yes</td><td>The username for the WLS admin server.</td></tr><tr><td>Weblogic Admin Password</td><td>`FDWLS_ADMIN_PASSWORD`</td><td>Yes</td><td>The password for Weblogic Admin User.</td></tr><tr><td>Weblogic Admin Domain Directory</td><td>`FDWLS_ADMIN_DOMAIN_DIRECTORY`</td><td>No</td><td>Weblogic Domain Directory for AdminServer. If not provided, Weblogic Domain Directory will be used.</td></tr><tr><td>Weblogic Domain Directory</td><td>`FDWLS_DOMAIN_DIRECTORY`</td><td>Yes</td><td>Weblogic Domain Directory.(e.g. `/u01/oracle/config/domains/soa_domain`)</td></tr></tbody></table>

# Inputs

<table><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><th>**Input Name**</th><th>**Input Code**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>Properties File Path</td><td>`FILE_PATH_TO_PROPERTIES`</td><td>No</td><td>Comma-separated list of paths to the properties file(s).\
If relative paths are given, they are assumed relative to the `FD_ARTIFACTS_DIR`** **directory.\
If this property is not specified, all properties files in the `FD_ARTIFACTS_DIR`** **directory will be processed.</td></tr></tbody></table>

# Outputs

<table><colgroup><col /><col /><col /></colgroup><tbody><tr><th>**Output Name**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>`FDWLS_OUT_IS_RESTART_REQUIRED`</td><td>No</td><td>A `boolean` value that indicates whether the server needs to be restarted to finish applying the configuration changes. You could use this in a workflow condition.</td></tr></tbody></table>

# Artifacts

This operation consumes properties-file artifacts.

# Endpoint Selection

This operation will select all available endpoints associated to the Target which have a resource type of WLS Admin Server. Since the admin server only runs on one server, it is expected that for a given domain, there will only be one endpoint with a resource type set to WLS Admin Server.

# Endpoint Execution

This operation will execute on the Admin Server endpoint selected using the WLS Admin Server resource type.

# Special Considerations

If Properties File Path is not specified, the FD\_ARTIFACTS\_DIR folder will be used. If a relative path is specified, the path will be relative to the FD\_ARTIFACTS\_DIR directory. WebLogic configuration files including JMS modules are backed up to FD\_TEMP\_DIR/configbackup before modifications. As with all files in the endpoint working directory, these files will be saved for 3 days before being deleted.

## Example Folder Structure

![Image](https://mintcdn.com/flexagon-llc-ce77a95c/NkeZh5D-Nf8j_WaD/images/fd111/12596423425.png?fit=max\&auto=format\&n=NkeZh5D-Nf8j_WaD\&q=85\&s=92c8814ee1e5a7ab814c108a7b7e76ff)

* Properties file can be named as per your requirements. See Example Properties File below.

* myWorkManager.properties – This is the main properties file. The path to it is referenced by Properties File Path.

* DEV/ myWorkManager.properties- optionally create a file here and override some properties with it per environment. The filename must match.

* PROD/ myWorkManager.properties - optionally have several environments.

  * Sub folder names for environment overrides must be FlexDeploy environment code.

## Example Property File

This sample file defines a Work Manager and all of the available properties.

> [!TIP]
>
> ### Backslash in Properties file
>
> If you want \ (backslash) in any property value, use \\\ or \u005c. This is Java properties file [load](http://docs.oracle.com/javase/7/docs/api/java/util/Properties.html#load%28java.io.Reader%29) syntax.

##### **Example Work Manager Properties**

```
#Pound signs make comments.

WorkManagerList=myWorkManager

myWorkManager.Targets=AdminServer,SOA_Cluster
myWorkManager.MaxThreads=5
myWorkManager.MinThreads=1
myWorkManager.CapacityCount=3
myWorkManager.StuckThreadBehavior=Manual
myWorkManager.StuckThreadCount=23
myWorkManager.MaxStuckThreadTime=12
myWorkManager.ResumeWhenUnstuck=false
myWorkManager.Notes=This work manager was made by FlexDeploy.

#Pick at most one of these.
#myWorkManager.FairShareRequest=50
#myWorkManager.ResponseTimeRequest=250
myWorkManager.ContextRequestList=contextRequest1,contextRequest2,contextRequest3

#you can provide UserName, GroupName, and/or RequestClassName for each Context Request in the list.
myWorkManager.contextRequest1.UserName=weblogic

myWorkManager.contextRequest2.GroupName=administrators

myWorkManager.contextRequest3.GroupName=users
myWorkManager.contextRequest3.RequestClassName=ImportantClass
```

The example properties above create the following in Weblogic Console:

![Image](https://mintcdn.com/flexagon-llc-ce77a95c/NkeZh5D-Nf8j_WaD/images/fd111/12596423422.png?fit=max\&auto=format\&n=NkeZh5D-Nf8j_WaD\&q=85\&s=c8956b3ea0a16fe4bb907f8d1481bc73)

## Properties File Format

Multiple Work Managers can be defined in each properties file. Each properties file must contain a WorkManagerList in order to be included.

If using multiple files, make sure that the lists contain unique values across files.

The properties files will be processed for property replacement using \$\{\{VARIABLE\_NAME}} format. See [Property Replacement Support](https://docs.flexagon.com/flexdeploy-11-2-documentation/flexdeploy-variables-guide/property-replacement-support.md) for more information about property replacement.

## Property Definitions

Only the properties with \* after them are required. The rest are optional.

<table><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><td>**Property Name**</td><td>**Default Value**</td><td colspan="2">** Notes**</td></tr><tr><td>Name</td><td>*The name from the list is used by default.*</td><td colspan="2">\
</td></tr><tr><td>MaxThreads</td><td>\<not set></td><td colspan="2">\
</td></tr><tr><td>MinThreads</td><td>\<not set></td><td colspan="2">\
</td></tr><tr><td>CapacityCount</td><td>\<not set></td><td colspan="2">\
</td></tr><tr><td>Targets\*</td><td>\<not set></td><td colspan="2">**Required**The targets for the Work Manager, constraints, and Request Classes.</td></tr><tr><td>Notes</td><td>\<not set></td><td colspan="2">\
</td></tr><tr><td>StuckThreadsBehavior</td><td>Default       </td><td colspan="2">(Default | Ignore | Manual)Set to **Manual** to use the following 3 options.</td></tr><tr><td>StuckThreadCount</td><td>0</td><td colspan="2">Only used when `StuckThreadsBehavior` is set to **Manual**.</td></tr><tr><td>MaxStuckThreadTime</td><td>0</td><td colspan="2">Only used when `StuckThreadsBehavior` is set to **Manual**.</td></tr><tr><td>ResumeWhenUnstuck</td><td>true</td><td colspan="2">Only used when `StuckThreadsBehavior` is set to **Manual**.</td></tr><tr><td>\
</td><td>\
</td><td colspan="2">\
</td></tr><tr><td colspan="4">**Pick at most one of the following:**</td></tr><tr><td>FairShareRequest</td><td>\<not set></td><td colspan="2">Integer that will be used as a percentage of time (e.g. 50)</td></tr><tr><td>ResponseTimeRequest</td><td>\<not set></td><td colspan="2">Integer that will be used as a target time to handle requests in milliseconds (e.g. 150)</td></tr><tr><td>ContextRequestList</td><td>\<not set></td><td colspan="2">A comma-separated list of context request class case names(e.g. case1,case2)</td></tr><tr><td>contextRequestListname.UserName</td><td>\<not set></td><td colspan="2">(e.g. myWorkManger.case1.UserName=weblogic)</td></tr><tr><td>contextRequestListname.GroupName</td><td>\<not set></td><td colspan="2">(e.g. myWorkManger.case2.GroupName=Administrators)</td></tr><tr><td>contextRequestListname.RequestClassName</td><td>\<not set></td><td colspan="2">(e.g. myWorkManger.case2.RequestClassName=ImportantClass)</td></tr></tbody></table>
