Using the Creo Parametric Publisher with Multiple Workers for HDIC Conversion
Introduction
This section describes how to add multiple worker support to the Creo Parametric publisher for HDIC conversion. To create an HDIC publish job for an individual part, use the following steps:
1. Define a Global Attribute using Type Manager > Manage Global Attributes.
2. Attach the Global Attribute to the EPMDocument type.
3. In Preference Management, specify the Global Attribute as the HDIC Publish enabling attribute.
4. Check out a CAD Document, and edit the attributes to assign/change the Global Attribute value (you may have to customize the UI view to make the Global Attribute visible).
5. Check in the CAD Document.
6. Publish the part.
* 
A regular publish job will trigger the conversion, if the Global Attribute is set to true on the CAD Document, unless the CAD Document is a working copy (i.e,. is presently checked out, or is a new CAD Document, never checked in yet).
The Conversion Process
The main objective in a successful Multiple Worker conversion is to avoid having two Creo Parametric workers attempt to convert the same part at the same time. The expected behavior for Multiple Workers for HDIC Conversion involves the following details:
1. HDIC conversion of an individual component that has no child components; a non-assembly leaf part.
The WVS publish job communicates to the worker immediately to generate a Translated Image Model (TIM).
* 
A TIM is also referred to as an Image CAD Document. This topic uses TIM for convenience.
The WVS publish job should not be resubmitted in this case, since there are no child components.
The WVS publish job communicates to the worker to generate the visualization data in addition to generating a TIM.
If the adapter is unable to generate a TIM for an EPMDocument, WVS will request the adapter to createa Dummy TIM (Placeholder Image CAD Document).
If the Dummy TIM request fails, WVS will ensure that the job fails, and no visualization data (no representation) will be created.
Expectations of the Creo Parametric Creo View Adapter behavior:
If the EPMDocument does not have a TIM or the TIM is out of date, the adapter generates one, and writes messages to the job log indicating a TIM has been generated
If the EPMDocument has an update to date TIM, no TIM will be generated and a message will be displayed that the TIM is updated in the job log.
Once the adapter receives a request to generate a Dummy TIM, it creates one and also generates the visualization data.
2. HDIC conversion ofa single-level assembly; all child components of the assembly are leaf parts.
If all components have a TIM (an up-to-date TIM ora Dummy TIM), WVS will communicate to the Adapter/workerto generate a TIM for the assembly job.
In this case, the job should not be resubmitted.
Since all child TIMs exist, the expected behavior for submitting an HDIC conversion of this assembly is the same as in detail #1.
If any component of the assembly does not have an up-to-date TIM, the WVS behavior will be as follows:
WVS will check to see if any of the child components that are missing up-to-date TIMs currently have an HDIC conversion job in aReady or Executing state (with the same priority in any queue set). (See the Note at the end of this document about Ready and Executing jobs.) If an HDIC conversion job does not exist for the child component that is missing the up-to-date TIM, WVS will submit a new HDIC conversion job for the child component. If an HDIC conversion job already exists for the child component, then a new HDIC conversion job for the child component will not be submitted; if any child component's HDIC job happens to be executing at the same time, the assembly job will wait up to 5 seconds for it to finish before resubmitting itself.
Once WVS has confirmed that an HDIC conversion job exists for a child component that is missing the up-to-date TIM (either a job that already existed or a new one has been submitted), the assembly job will be resubmitted to the WVS publishing queue to be processed at a later time, since a TIM cannot be created for the assembly until all child component TIMs (an up-to-date TIM ora Dummy TIM)have been created first.
* 
See #3 for expected behavior for resubmitted HDIC jobs.
If any child component of the assembly that does not have an up-to-date TIMis prohibited from publishing, the assembly job will fail immediately. No jobs will be submitted for child components with missing TIMs.
If a child component of the assembly does have a TIM, and the child is prohibited from publishing, assembly job will succeed.
If a submitted HDIC conversion job for a child component fails, the assembly job will fail immediately. Note that component jobs that have already been submitted will be executed unless manually deleted from somewhere else.
If a child component already has a TIM (an up-to-date TIM ora Dummy TIM), no HDICconversion job will be submitted for it.
If all existing or newly submitted jobs forany child component that does not have a TIM fail to create a TIM (including failure to create a Dummy TIM),the resubmitted assembly job will fail immediately without being sent to the Adapter/ worker.
Note that failure of visualization publishing in a child component job hasno impact on the resubmitted assembly job.
Also note that success or failure of an HDIC conversion in a child component job has no impact on its sibling component's HDICjobs.
The expected behaviorfor each existing or newly submitted child component job is the same as in #1.
3. When WVSresubmits an assembly HDIC conversion job to the WVS publishing queues, the expected behavior is as follows:
The assembly job is removed from the numbered publishing queue and put in the same H/M/L queue it was in before execution.
The new, resubmitted job will have a new job number.
The resubmitted job log will carry over and when it begins to execute again, all job log messages will be appended.
The resubmitted job log will clearly show each job execution.
The resubmitted job log will show the number of times it has been resubmitted.
4. HDIC conversion of a multiple-level assembly, at least one child component of the assembly is a subassembly.
The expected behavior is essentially #2. If any immediate subassembly does not have an up-to-date TIM, the top assembly job will submit HDIC conversion jobs for that subassembly’s components of all levels that are missing up-to-date TIMs. Jobs for components at the deepest level of the assembly structure are submitted first. The job for the top assembly's immediate subassembly will be submitted last, just before the resubmitted top assembly job.
In perfect scenarios, components jobs will execute before the resubmitted assembly job, so the assembly job will not be resubmitted more than a handful of times. In rare cases, some component jobs may take a long time to finish, so the submission may get resubmitted many times.
If any conversion job for any component at any level in the assembly fails, all “parent”jobs, from its immediate assembly up to the original assembly job, will fail without being sent to the Adapter/worker.
In caseany subassemblies share the same components or subassemblies, consider these assemblies as #5.
5. Simultaneous HDIC publishing of multiple assemblies that share the same components and/or subassemblies:
The expected behavior for HDIC conversion of each assembly is as described in #4.
If one assembly HDIC conversion job has already submitted a child HDIC job for a shared component that does not have an up-to-dateTIM, other assemblies should generally not submit another job for the same component.
Because of race conditions, there may be rare cases where two or more jobs are submitted for the same component. Those jobs should publish successfully as long as they are not executed at the exact same time.
When twoor more HDIC jobs for the same part execute at exactly the same time:
Only the job with the lowest job number will be sent to the Adapter/worker for HDIC conversion (and regular publishing).
Other jobs that have unique representation names will only perform regular publishing, with proper a warning job log message to indicate the skipping of HDIC conversion.
Any job that has the same representation name as another job but has a larger job number than the other job will fail with the proper job log message.
In any case, when two HDIC jobs for the same partare sent to the Adapter/workerat exactly the same time, they are likely to fail; such failure may be inevitable. But it should not happen very often, perhaps in less than 1%of all HDIC publish jobs. This is true even if the originalassembly HDIC jobs were submitted to different queue sets by different users, with multiple number queues in each queue set and multiple CAD workers on different servers.
6. All component HDIC jobs spawned by an assembly HDIC job will have a job sourceset toJOB_SOURCE_SYSTEM, which is a new job source value.
7. Out-of-the-box, all component conversions spawned by an assembly HDIC job will bypass the custom hook specified by thepublish.publishqueue.priorities.filtermethod property.
Out-of-the-box, when an assembly job submits jobs for components and resubmits itself, the jobs go to the same queueset with the same priority as the original assembly job.
Out-of-the-box, publish.publishqueue.priorities.filtermethod.bypass.jobsources method is bypassed. To not bypass the custom hook, change the publish.publishqueue.priorities.filtermethod.bypass.jobsources property.
The custom hook should not assign submitted components jobs a lower priority than their assembly job. If a custom hook assigns a child HDICjob to a lower priority thanits assembly HDIC job, the resubmitted assembly HDIC job will fail without being sent to the Adapter/worker.
* 
The following jobs are not considered as READY or EXECUTING jobs:
An executed (i.e., successful or failed) job;
AREADY job in a H/M/L queue that is STOPPED or DISABLED;
A READY job in a H/M/L queue that is STARTED/STARTING, but none of the numbered queues of the same queue set is STARTED/STARTING;
AREADY job in a numbered queue that is STOPPED or DISABLED;
An EXECUTING job in a STARTED numbered queue that is in the middle ofbeing deleted.
Was this helpful?