Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
How to pass parameters to the Deploy and Run script in OOTB PLC
PreetpalSingh
Env: Teamsite: 7.2.1, Windows 2008 R2
Legend: DnR = Deploy and Run configuration in OD.
We have a requirement where we are customizing the OOTB PLC workflow. The tasks are as follows:
1. After the content approval step in the default PLC, an external task is created that creates a properties file in Teamsite and attaches it in the workflow. The property file creates the property file conditionally, i.e., it may or may not create a property file depending on a condition.
2. Followed by OOTB Production deployment task which deploys the files using the OpenDeployWebRoot.xml deployment descriptor.
3. We have added DnR to the OpenDeployWebRoot.xml. This DnR executes a shell script on the target runtime environment after successful deployment of content.
Q1. I am looking at a way to pass the name of the properties file created in the step 1 as a parameter in the DnR configuration.
The configuration of the DnR will look something like this:
filePath="$fileList^">
filePath="$cacheFileList^">
<script async="Yes" cmd="/sample.sh $availableProperty^"/>
where: $availableProperty^ = parameter to be passed to the shell script on the target runtime environment.
Q2. Is there a way using which I can call this script conditionally, i.e., The DnR calls only when the preceeding step creates a property file?
Thanks,
Preetpal Singh Bindra
Find more posts tagged with
Comments
PreetpalSingh
Re posting the question as there was a problem posting it the first time.
Env: Teamsite: 7.2.1, Windows 2008 R2
Legend: DnR = Deploy and Run configuration in OD.
We have a requirement where we are customizing the OOTB PLC workflow. The tasks are as follows:
1. After the content approval step in the default PLC, an external task is created that creates a properties file in Teamsite and attaches it in the workflow. The property file creates the property file conditionally, i.e., it may or may not create a property file depending on a condition.
2. Followed by OOTB Production deployment task which deploys the files using the OpenDeployWebRoot.xml deployment descriptor.
3. We have added DnR to the OpenDeployWebRoot.xml. This DnR executes a shell script on the target runtime environment after successful deployment of content.
Q1. I am looking at a way to pass the name of the properties file created in the step 1 as a parameter in the DnR configuration.
The configuration of the DnR will look something as in the attached file.
Q2. Is there a way using which I can call this script conditionally, i.e., The DnR calls only when the preceding step creates a property file?
Thanks,
Preetpal Singh Bindra
ISCBorisB
>>Q1. I am looking at a way to pass the name of the properties file [...] as a parameter...
You may use "Open Deploy Variables" to do that. Note that if you create OD Variable
"availableProperty" it will be modeled as Deployment Task Variable "odSubst_availableProperty".
That's the name you should be using as OD Configuration "-k" Parameter.
>>Q2. Is there a way using which I can call this script conditionally...
The easiest way to do it in WFM is IMO to use two Deployment Tasks with different Configurations,
with and without DNR. Then code your "Set Properties" Task to transition accordingly.
Alternatively, you can dynamically modify "odDeploymentName" Task Variable. Or, you can create your
own Deployment External Task (or custom Class) and do whatever you want there.
Untitled.png
PreetpalSingh
Thanks for your reply. This seems to be the solution if i had a custom perl/java script and the OD descriptor file. But here we are using PLC workflow only which doesnt have any of these. the way to pass a paramter in this would not be the same as we do for our custom scripts.
PLC configuration files are tightly coupled.
Any idea of introducing a configuration withing the PLC framework will be needed here.
Any thoughts / pointers / directions are welcome!
ISCBorisB
PLC configuration files are tightly coupled...
I seriously doubt that you can customize "Publish Content" WFs' behavior without customizing Models/Models' components.
Faizi
Hi Preetpal,
As you know PLC workflow is tightly coupled, So you can't do modifications without writing your own custom code and customization.
I would suggest a solution that is might be weird but fulfill your requirement. You should add one deploy task after the production deployment task, write a deployment descriptor with simple definition that might not deploy any file but call DNR script.
In this way you can pass parameters to deployment descriptor where you can run script based on passed values on the target node.
HTH!