Community

Post

Extending XL Deploy Websphere Plugin

Hi All,

I am trying to extend/customize the websphere plugin for XL Deploy to have the ability to pause/resume J2C Activation Specifications. Currently this feature isn't available via XL Deploy Websphere plugin. I have created the required python script to run the target host and also synthetic.xml as well xl-rules.xml files. Here I am facing challenges whenever I tried to call my jython script via xl-rules or synthetic xml files. I have tried using <jython> and <wsadmin> steps in xl-rules.xml files, but I am getting different errors for those.

Has anyone tried this? If so, could you please let me know how to call this jython script from XL rules file or from synthetic.xml file? I can provide both the files if needed. Thanks in advance and I really appreciate your help.

Thanks for your help. After correcting the typo I was able to run my python script as a daemon on target host. But, I am now running into issues while referencing the properties in my python script. I have a couple of properties on my deployable that I want to refer them in my script but I am getting below error when I tried to do that,

Error getting task preview for deployment [deployment-4192c8b4-d6b4-48d5-aa1a-65df66692ebb]Error while evaluating rule [was.J2CActivationSpecControlDeployed.CREATE_MODIFY]: Error while executing script [jython-expression]: AttributeError: 'com.xebialabs.deployit.plugin.was.deployed.Extensi' object has no attribute 'fileUri' in <script> at line number 1

The latest error refers to the python-context <fileUri expression="true">deployed.fileUri</fileUri>

Error while executing script [jython-expression]: AttributeError: 'com.xebialabs.deployit.plugin.was.deployed.Extensi' object has no attribute 'fileUri' in <script> at line number 1

This is, indeed true. Neither the type was.J2CActivationSpecControlDeployed nor was.ExtensibleDeployedResource from which it extends has the property fileUri. I'm not sure why that has been added to the rule.

Thanks for your post. But, I am trying to refer the path of the file in my python script so that it can process that file. I have added the screenshots of what I am talking about. In the below screenshot you can see the fileUri property. I want to refer this in my python script.Is it supposed to be deployable.file.path instead of deployed.file.path?. I really appreciate your help.

Ok that clarifies things I guess you changed the deployable type. Yes to reference a deployed artifcact you want to use deployed.file.path. The fileUri property has meaning in the deployable context it is the location of the file to be uploaded. In the deployed you want to reference the uploaded file by deployed.file.path.

Thanks for the response Dan. Yes, I have changed the deployable type from was.Deployable to udm.BaseDeployableArchiveArtifact. I have tried referring "deployed.file.path" in my python script, but it threw the similar error saying that the dictionary object doesn't have the attribute file. Below is the snippet of my reference in my python script,

Looking at the synthetic that you sent offline, there is still a problem with the deployed type you are using. The deployed type was.ExtensibleDeployedResource does not have either a deploye.file or deployed.fileUri. It isn't an artifact type.

You want to use artifcat types for both the deployed and the deployable.

If you start with the definition:

<type type="was.J2CActivationSpecControlDeployed" extends="was.ExtensibleDeployedArtifact" deployable-type="was.J2CActivationSpecControl" container-type="was.DeploymentManager" description="Artifact that can be used to control JMS Activation Specification">