Beispiel #1
0
        ///
        ///	 <summary> * simulate makeReady of this node the internal node will be modified to reflect the makeready all required
        ///	 * resources should be available </summary>
        ///
        public virtual void makeReady()
        {
            if (bExpandGrayBox && EnumType.ProcessGroup.Equals(theNode.getEnumType()) && theNode.hasAttribute(AttributeName.TYPES))
            {
                theExpandedNode = theNode.addCombined(theNode.getTypes());
                VElement resLinks = theNode.getResourceLinks(null);
                if (resLinks != null)
                {
                    int size = resLinks.Count;
                    for (int i = 0; i < size; i++)
                    {
                        ((JDFResourceLink)resLinks[i]).removeAttribute(AttributeName.COMBINEDPROCESSINDEX);
                    }
                }

                initAuditPool(theExpandedNode);
                theExpandedNode.copyElement(theNode.getResourceLinkPool(), null);
            }
            else
            {
                theExpandedNode = theNode;
            }
            VElement nodeLinks = getNodeLinks();

            theStatusCounter.setActiveNode(theExpandedNode, null, nodeLinks);

            VElement vResLinks = theExpandedNode.getResourceLinks(null);

            if (vResLinks != null)
            {
                int siz = vResLinks.Count;
                for (int i = 0; i < siz; i++)
                {
                    JDFResourceLink rl = (JDFResourceLink)vResLinks[i];

                    if (EnumUsage.Input.Equals(rl.getUsage()))
                    {
                        VElement vRes = rl.getTargetVector(-1);
                        for (int j = 0; j < vRes.Count; j++)
                        {
                            VElement leaves = ((JDFResource)vRes[j]).getLeaves(false);
                            for (int k = 0; k < leaves.Count; k++)
                            {
                                JDFResource r = (JDFResource)leaves[k];
                                r.setResStatus(EnumResStatus.Available, true);
                            }
                        }
                    }
                }
            }
        }
Beispiel #2
0
        public virtual void testReprintJMF()
        {
            testAuditsImageSetting();
            statCounter.setActiveNode(null, null, null);
            string           sheet        = vsSheet.stringAt(1);
            VJDFAttributeMap vmP          = new VJDFAttributeMap();
            JDFAttributeMap  attributeMap = new JDFAttributeMap(EnumPartIDKey.SheetName, sheet);

            attributeMap.put("SignatureName", "Sig1");
            attributeMap.put("Separation", vsCMYK.stringAt(3));
            attributeMap.put("Side", "Front");

            vmP.Add(attributeMap);
            statCounter.setActiveNode(n, vmP, vRL);
            string refXM    = rlXMOut.getrRef();
            string refMedia = rlMediaIn.getrRef();

            statCounter.setTrackWaste(refXM, true);
            statCounter.setTrackWaste(refMedia, false);

            statCounter.setActiveNode(n, vmP, vRL);
            statCounter.setWorkType(EnumWorkType.Rework);
            statCounter.setPhase(EnumNodeStatus.InProgress, "Imaging", EnumDeviceStatus.Running, null);
            statCounter.addPhase(refMedia, 1, 0, true);
            statCounter.addPhase(refXM, 1, 0, true);
            statCounter.setPhase(EnumNodeStatus.InProgress, "Imaging", EnumDeviceStatus.Running, null);
            JDFDoc d2  = statCounter.getDocJMFResource();
            JDFJMF jmf = d2.getJMFRoot();

            jmf.convertResponses(null);
            VElement vSigs = jmf.getMessageVector(JDFMessage.EnumFamily.Signal, JDFMessage.EnumType.Resource);

            d2.write2File(sm_dirTestDataTemp + "ImageSetResourceReprint_.jmf", 2, false);
            JDFDoc dStatusJMF = statCounter.getDocJMFPhaseTime();

            jmf = dStatusJMF.getJMFRoot();
            jmf.convertResponses(null);
            for (int i = 0; i < vSigs.Count; i++)
            {
                jmf.copyElement(vSigs.item(i), null);
            }
            dStatusJMF.write2File(sm_dirTestDataTemp + "ImageSetReprint_.jmf", 2, false);

            // JDFResourceAudit ra=
            statCounter.setResourceAudit(refMedia, EnumReason.ProcessResult);
            // JDFProcessRun pr=
            statCounter.setProcessResult(EnumNodeStatus.Completed);

            d.write2File(sm_dirTestDataTemp + "ImageSetAmount_Reprint.jdf", 2, false);
        }