URL filtration while deployment using PLC workflow

Hi All,

 

A new requirement has been purposed for the production enviornment to filterout non-enviornment url's content deployment.

Need help on which appraoach will be better for restricting the content which are having url's of UAT in production enviornment. DCR level validation will be better or some check during deployment through workflow is better option.

 

We are using PLC workflows.

 

Please comment with some implemention overview.

 

Thanks in advance

Comments

  • It can be done,  not trivial.  IMHO, also a waste of time.  If you have fully qualified URLs in your code (with the env) that is what you should be fixing. Change everything to a server relative path and use proxy-pass or other web server redirects to redirect off the server. 

     

    If you decide to do this. then you need to code it. 

     

    It will be easier (but much less useful) to do the test after the review step,  Just put an external task in and search. 

     

    Doing this before the approval task (when the popup takes over the browser) is the right way to do it.  But to get that to work you will need to create a urltask, with an assocaited JSP and Java code to perform the test. If it finds bad URLs then you transition to the error.  The problem many people struggle with is seamlessly passing from popup to app to popup to app.  When that does not transition correctly tasks do not autostart and the job hangs until someone clicks on start task in the WF UI. 

     

     

     

     

     

  • If you're deploying to LiveSite runtimes another option would be a custom token/update all XSL link output to use the custom token.

     

    You should then be able to feed in environment-specific maps of valid/invalid domains and either remove wrong-domain links or convert them in the correct-domain ones.  External domains (i.e. not in the map) would be passed through as-is.

  • Hi,

    I have successfully created external task for bad url filteration in the DCR through workflow.And it is working fine.

     

    Just need your help to stop the task once bad url is found in the content.

    How can i forcefully stop the task through java code.Is their some method avaliable that can stop the running task ??

     

    Thanks in advance.

     

  • What do you mean "stop the task"? The task is your java code, so you can simply return, or break the loop, or execute whatever conditional logic you need to not do anything further.

     

    If you meant "stop the whole workflow", then your external task needs a transition to an End Task, and then your code can execute a callback and choose that transition. That's not the best user experience though -- you might want to improve that to provide the user with some type of notification as to why the job ended.

TeamSite Developer Resources

  • Docker Automation

  • LiveSite Content Services (LSCS) REST API

  • Single Page Application (SPA) Modules

  • TeamSite Add-ons

If you are interested in gaining full access to the content, you can register for a My Support account here.
image
OpenText CE Products
TeamSite
APIs