Exemplo n.º 1
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);
        }
Exemplo n.º 2
0
        public virtual void testAuditsImageSetting()
        {
            for (int i = 0; i < vsSheet.Count; i++)
            {
                string           sheet        = vsSheet.stringAt(i);
                VJDFAttributeMap vmP          = new VJDFAttributeMap();
                JDFAttributeMap  attributeMap = new JDFAttributeMap(EnumPartIDKey.SheetName, sheet);
                attributeMap.put("SignatureName", "Sig1");

                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.setPhase(EnumNodeStatus.Stopped, "PowerOn", EnumDeviceStatus.Stopped, "PowerOn");

                statCounter.setPhase(EnumNodeStatus.InProgress, "Imaging", EnumDeviceStatus.Running, null);
                statCounter.addPhase(refMedia, 5, 0, true);
                statCounter.addPhase(refXM, 5, 0, true);
                statCounter.setPhase(EnumNodeStatus.InProgress, "Imaging", EnumDeviceStatus.Running, null);

                // JDFResourceAudit ra=
                statCounter.setResourceAudit(refMedia, EnumReason.ProcessResult);

                JDFProcessRun pr = statCounter.setProcessResult(EnumNodeStatus.Completed);
                pr.setDescriptiveName("we even have the utterly useless ProcessRun");
            }
            d.write2File(sm_dirTestDataTemp + "ImageSetAmount_.jdf", 2, false);
            JDFDoc d2  = statCounter.getDocJMFResource();
            JDFJMF jmf = d2.getJMFRoot();

            jmf.convertResponses(null);
            JDFSignal       sig = jmf.appendSignal(org.cip4.jdflib.jmf.JDFMessage.EnumType.Notification);
            JDFNotification not = sig.appendNotification();

            not.setXPathAttribute("MileStone/@MileStoneType", "PrepressCompleted");
            not.setXPathAttribute("MileStone/@Amount", "5");
            d2.write2File(sm_dirTestDataTemp + "ImageSetAmount_.jmf", 2, false);
            JDFDoc dStatusJMF = statCounter.getDocJMFPhaseTime();

            jmf = dStatusJMF.getJMFRoot();
            jmf.convertResponses(null);
            dStatusJMF.write2File(sm_dirTestDataTemp + "ImageSetPhaseTime_.jmf", 2, false);
        }