Contents
This step needs to be done only if clones-upgrade container was run for the deployment. To clear the Keycloak cache, follow the steps mentioned below:
Login to Keycloak Master Admin console.
Select any of the Realms and in Realm Settings and go to Cache tab.
Click on all the three Clear buttons (Realm Cache, User Cache and Keys Cache) to clear cache in all realms.
Note:
This process is required only if the clones-upgrade program was run as part of deployment.
In case the person who is doing the post-deployment steps are not aware of the deployment procedures completed, this can be executed.
Invoice Extraction requires that the user with offline access (usually sense master) have the following access. Add these roles if they are not available.
invex_admin
invex_user
offline_access
User performing the post deployment activities is supposed to have the following roles:
admin
installation_engineer
invex_admin
invex_user
offline_access
skill_designer
skill_reviewer
uma_authorization
For applying changes to new projects (Golden workflows)
Import the modified workflows from 7.1.1 skill dump to replace existing (if workflows are not customized)
If workflows are customized, make necessary changes to customized workflow referring below details
Publish and mark the two workflows as golden skills
The skills of the new projects created will contain the latest changes
For applying changes to old projects
Modify the existing project specific workflows as per the change log
New micro actions are part of the skill dump and will get automatically imported on importing the golden workflows
Save and publish the modified workflows specifically for every existing projects which are relevant
Workflow: Invoice_PWF_PushToDUSched
DU rest service requires new parameter “origin” and it has to be set as “invoice_pwf” for the requests from invoice PWF.
Workflow Invoice_PWF_PushToDUSched to be modified to include additional argument and value in in microaction JSON_for_DU (as shown in below image fig.1)
The update to be made to golden skill Invoice_PWF_PushToDUSched and to be marked as golden.
Also the same update to be made for relevant project which already exists and to be published.
Workflows Modified:
Invoice_PWF_PushToDUSched
Invoice_PWF_DownloadInvoice
Changes in Invoice_PWF_PushToDUSched workflow
New microaction added –GetSkillExeDetails (get_project_execution_details_v2) to fetch the workflow_id
Microaction added as the third step in the workflow (after Generate_run_name and before Fetch_du_project_id)
Attributes |
Value |
smartopsPwfUrl |
${ get_sp("SMARTOPS_PWF_HOST") } |
projectId |
${get_sp("clonesParam.projectId")} |
sessionId |
${get_sp("clonesParam.sessionId")} |
organizationId |
${ get_sp("clonesParam.organizationId") } |
offlineToken |
${ get_sp("clonesParam.offlineToken") } |
connectTimeout |
120 |
socketTimeout |
120 |
The workflow_id is fetched at JSON_for_PWFDB and sent through existing API_to_PWFDB(no change in API_to_PWFDB)
New attributes at JSON_for_PWFDB, this microaction should be placed as per the flow in the image.
Attributes |
Value |
field9 |
inbound_workflow_id |
value9 |
${str(eval(skillExeDetails)[0].get("wfExecutionId"))} |
Flow redesigned, batch creation in PWF now happens before the files are pushed to du for processing. New flow shared in screenshot above (API_to_PWFDB is moved to front as in image) – This is an optional but recommended change to create the record in PWF even DU service call is failed to help traceability.
Changes in Invoice_PWF_DownloadInvoice
New microaction added –GetSkillExeDetails (get_project_execution_details_v2) to fetch the workflow_id
Microaction added as the first step in the workflow, need to be placed before Generate Report.
Right click on the micro action and mark it as the start.
Attributes |
Value |
smartopsPwfUrl |
${ get_sp("SMARTOPS_PWF_HOST") } |
projectId |
${get_sp("clonesParam.projectId")} |
sessionId |
${get_sp("clonesParam.sessionId")} |
organizationId |
${ get_sp("clonesParam.organizationId") } |
offlineToken |
${ get_sp("clonesParam.offlineToken") } |
connectTimeout |
120 |
socketTimeout |
120 |
The workflow_id is sent as additional parameter of existing GenerateReport API
Replace the API url with ${"http://" + get_sp("SMARTOPS_INVEX_API") + "/download/generatereport/"+invex_project_id+"?outbound_workflow_id="+str(eval(skillExeDetails)[0].get("wfExecutionId"))}
Workflow name = Invoice_PWF_AutoAllocation
Import the workflow from 7.0.2 skill dump
Publish and mark workflows as golden skills
For existing projects, workflows to be manually loaded to corresponding project folder with, where workflow name should be modified as with a suffix of _<project_id>. The steps for doing this are as follows.
From lover environment create a project with same name (Just provide name and description) and install
Export this work flow
Import to new environment
Save, publish and promote to golden
Workflow name = CheckRoleCondition
For the step – AddResponseMessage, added a new attribute. This will add the number of pages in the invoice to the response message sent to queue.
Key - number_of_pages
Value - ${str(eval(invoice_details).get("document_details", {}).get("_source", {}).get("page_count", None))}
Workflow name = Invoice_PWF_Installation
1. Open skill settings and set the following input parameters.
Inputs |
|
|
Default Value <Empty> |
invex_max_num_of_pages |
Default Value <Empty> |
invex_allocation_scheduler_interval |
Default Value <Empty> |
invex_priority_criteria |
Default Value <Empty> |
2. Make changes as per the flow shown below.
The details of each node in the above workflow is presented below.
Step Name: IsAllocScheduled
Operation: Is Not Empty
Attributes |
|
value |
invex_allocation_scheduler_interval <FIELD> |
Step Name: PWFProjectSuccess
Operation: PWF Project Status Update
Attributes |
|
* smartopsPwfUrl |
${ get_sp("SMARTOPS_PWF_HOST") } |
* smartopsPwfUrl |
${ get_sp("SMARTOPS_PWF_HOST") } |
* status
|
READY |
* projectId |
${ get_sp("clonesParam.projectId") } |
offlineToken |
${ get_sp("clonesParam.offlineToken") } |
proxyHost |
${ get_sp("proxy.host") } |
proxyPort |
${ get_sp("proxy.port") } |
proxyUsername |
${get("proxy_username", "")} |
proxyPassword |
${get("proxy_password", "")} |
organizationId |
${ get_sp("clonesParam.organizationId") } |
organizationName |
${ get_sp("clonesParam.organizationName") } |
connectTimeout |
120 |
socketTimeout |
120 |
Step Name: LogSuccess
Operation: Log.Print
Attributes |
|
Text |
Project successfully installed |
Step Name: IsNotEmptyMinConfig
Operation: Is Not Empty
Attributes |
|
Value |
invex_min_num_of_pages <FIELD> |
Step Name: IsNotEmptyMaxConfig
Operation: Is Not Empty
Attributes |
|
Value |
invex_max_num_of_pages <FIELD> |
Step Name: EvaluateIsDigits (After IsNotEmptyMaxConfig -> True)
Operation: evaluate_expression
Attributes |
|
expression |
invex_min_num_of_pages.isdigit() and invex_max_num_of_pages.isdigit() |
Step Name: EvaluateThresholdConfig (After EvaluateIsDigits -> True)
Operation: evaluate_expression
Attributes |
|
expression |
int(invex_min_num_of_pages) < int(invex_max_num_of_pages) and int(invex_max_num_of_pages) > 0 and int(invex_min_num_of_pages) > 0 |
Step Name: EvaluatePriorityCriteria (After Step EvaluateThresholdConfig -> True)
Operation: evaluate_expression
Attributes |
|
expression |
' ' not in invex_priority_criteria |
Step Name: PWFProjectFailure
Operation: PWF Project Status Update
Attributes |
|
* smartopsPwfUrl |
${ get_sp("SMARTOPS_PWF_HOST") } |
* smartopsPwfUrl |
${ get_sp("SMARTOPS_PWF_HOST") } |
* status
|
INSTALL_ERROR |
* projectId |
${ get_sp("clonesParam.projectId") } |
offlineToken |
${ get_sp("clonesParam.offlineToken") } |
proxyHost |
${ get_sp("proxy.host") } |
proxyPort |
${ get_sp("proxy.port") } |
proxyUsername |
${get("proxy_username", "")} |
proxyPassword |
${get("proxy_password", "")} |
organizationId |
${ get_sp("clonesParam.organizationId") } |
organizationName |
${ get_sp("clonesParam.organizationName") } |
connectTimeout |
120 |
socketTimeout |
120 |
Step Name: LogFailure
Operation: Log.Print
Attributes |
|
Text |
Please check auto allocation configuration |
Use ‘Step Name’ and diagram above to identify the node and its placement. Use ‘Operation’ to identify the microaction to be used.
Once the changes are completed, save & publish the workflow.
Workflow name: Invoice_PWF_CheckRoleCondition
Automation Story: PWFInvoiceExtractionApprovalRoute
Make changes as per the flow shown below.
Highlighted Nodes were added/modified
The details of each node in the above workflow is presented below.
Step Name: JSONGetExtractionTime
Operation: Json value extract v2_2
Attributes |
|
sourceJson |
invoice_details <FIELD> |
extractSpec |
$.document_details._source.created_date |
pickFirstElementForArray |
true |
Outcome |
|
extraction_start_time |
value |
returnCode |
returnCode |
errorMessage |
errorMessage |
exception |
exception |
Step Name: JSONGetDocumentName
Operation: Json value extract v2_2
Attributes |
|
sourceJson |
invoice_details <FIELD> |
extractSpec |
$.document_details._source.document_name |
pickFirstElementForArray |
true |
Outcome |
|
document_name |
value |
returnCode |
returnCode |
errorMessage |
errorMessage |
exception |
exception |
Step Name: JSONGetParentDocId
Operation: Json value extract v2_2
Attributes |
|
sourceJson |
invoice_details <FIELD> |
extractSpec |
$.document_details._source[?(@.parent_doc_id)].parent_doc_id |
pickFirstElementForArray |
true |
Outcome |
|
parent_doc_id |
value |
returnCode |
returnCode |
errorMessage |
errorMessage |
exception |
exception |
Step Name: JSONGetPageCount
Operation: Json value extract v2_2
Attributes |
|
sourceJson |
invoice_details <FIELD> |
extractSpec |
$.document_details._source.page_count |
pickFirstElementForArray |
true |
Outcome |
|
number_of_pages |
value |
returnCode |
returnCode |
errorMessage |
errorMessage |
exception |
exception |
Step Name: AddResponseMsg
Operation: JSON.Create.V2.2
Attributes |
|
field1 |
document_id |
value1 |
document_id <FIELD> |
field2 |
status_extraction |
value2 |
event_type <FIELD> |
field3 |
tags |
value3 |
tags <FIELD> |
field4 |
extraction_start_time |
value4 |
extraction_start_time <FIELD> |
field5 |
document_name |
value5 |
document_name <FIELD> |
field6 |
invoice_data |
value6 |
du_result <FIELD> |
field7 |
parent_doc_id |
value7 |
parent_doc_id <FIELD> |
field8 |
number_of_pages |
value8 |
number_of_pages <FIELD> |
Outcome |
|
responseJson |
jsonObject |
returnCode |
returnCode |
errorMessage |
errorMessage |
exception |
exception |
Use ‘Step Name’ and diagram above to identify the node and its placement. Use ‘Operation’ to identify the microaction to be used.
Once the changes are completed, save & publish the workflow.
Changes to address an issue with RabbitMQ credentials
For new projects:
Import Invoice_PWF_CheckRoleCondition workflow from the 7.1.1 dump.
Open the imported golden workflow in skill designer
Edit the Queuepublish step
Verify username is set to ${ get_sp("CLONES_QUEUE_USERNAME") }
Verify password is set to ${ get_sp("CLONES_QUEUE_PASSWORD") }
Save, publish and mark it as golden
For old projects:
Open the project specific Invoice_PWF_CheckRoleCondition workflow in skill designer
Edit the Queuepublish step
Change username to ${ get_sp("CLONES_QUEUE_USERNAME") }
Change password to ${ get_sp("CLONES_QUEUE_PASSWORD") }
Save and publish the workflow
Changes related to vhost configuration
For new projects:
Import Invoice_PWF_CheckRoleCondition workflow from the 7.1.1 dump.
Open the imported golden workflow in skill designer
Save, publish and mark it as golden
For old projects:
Import the golden workflow from the dump, this will make the new microaction available for modifying old workflows
Open the project specific Invoice_PWF_CheckRoleCondition workflow in skill designer
Delete the Queuepublish step
Search for queue_publish_vhost microaction and place it at the deleted microaction location
Edit the newly added microaction and change the attributes as below
hostName |
${ get_sp("CLONES_QUEUE_HOST") } |
port |
${ get_sp("clones.queue.port") } |
queueName |
pwf.invoice.queue |
username |
${ get_sp("CLONES_QUEUE_USERNAME") } |
password |
${ get_sp("CLONES_QUEUE_PASSWORD") } |
vhost |
ie |
message |
responseJson <field> |
Rename the step to Queuepublish
Draw a success path connecting DisplayFinalJson to Queuepublish step as shown below.
Save and publish the workflow