cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Publishing not happening between set states?

jfrancis
4-Participant

Publishing not happening between set states?

When we change the status of drawing, the worker doesn't publish the drawing. This was not the behavior before and we have to manually click on the thumbnail to create the representation. Could someone  provide me inputs as to where to begin investigating the cause of this issue.

7 REPLIES 7
MikeLockwood
22-Sapphire I
(To:jfrancis)

Here are some related articles CS43043, CS238377, CS229067, CS55087.

Unfortunately it's fairly complex.

satre-2
12-Amethyst
(To:jfrancis)

 

Change the publish.republishondocumentchange & publish.republishonepmdocumentchange to true in WVS.propeties.

 

 

Thanks

Shreyas

 

 

jfrancis
4-Participant
(To:satre-2)

these properties have been set to true

jfrancis
4-Participant
(To:satre-2)

these properties are set to true and still I face this issue

TomU
23-Emerald IV
(To:jfrancis)

This is how our system is setup (10.2 M030)

Automatically republish on state change:

xconfmanager -s publish.publishonepmdocumentchange=true -t /codebase/WEB-INF/conf/wvs.properties

xconfmanager -s publish.publishondocumentchange=true -t /codebase/WEB-INF/conf/wvs.properties

xconfmanager -s publish.republishonepmdocumentchange=true -t /codebase/WEB-INF/conf/wvs.properties

xconfmanager -s publish.republishondocumentchange=true -t /codebase/WEB-INF/conf/wvs.properties

xconfmanager -s publish.evaluaterulesonrepublish.default=true -t /codebase/WEB-INF/conf/wvs.properties

xconfmanager -p

Did you restart Windchill after making these changes?

jfrancis
4-Participant
(To:jfrancis)

Can publishing be handled through code?

HelesicPetr
22-Sapphire I
(To:jfrancis)

You can use the following code in a Promotion Request workflow in expresion robot in the end.

The code sends the EPM documents to publish queue

try

{

   

    //create publisher action -  action string .... M queue

    com.ptc.wvs.common.ui.PublisherAction pa = new com.ptc.wvs.common.ui.PublisherAction(com.ptc.wvs.common.ui.PublisherAction.QUEUEPRIORITY, "M");

    //check all target objects

    wt.fc.QueryResult promotables = wt.maturity.MaturityHelper.getService().getBaselineItems((wt.maturity.PromotionNotice)primaryBusinessObject);

    while (promotables.hasMoreElements())

    {

        Object obj = (Object) promotables.nextElement();

        if (obj instanceof wt.epm.EPMDocument)

        {               

            wt.epm.EPMDocument epmdoc = (wt.epm.EPMDocument) obj;

           

            //Find the latest version of document!!!

            wt.vc.config.ConfigSpec configSpec =  wt.vc.config.ConfigHelper.service.getDefaultConfigSpecFor(wt.epm.EPMDocument.class);

            wt.fc.QueryResult qr =  wt.vc.config.ConfigHelper.service.filteredIterationsOf(epmdoc.getMaster(), configSpec);

            if (qr != null)

            {

                while (qr.hasMoreElements())

                {

                    epmdoc = (wt.epm.EPMDocument)qr.nextElement();

                }

            }                       

           

           

            //check the EPMDocument object

            java.lang.String objRef;

            objRef = wt.fc.ObjectReference.newObjectReference(epmdoc).toString();

            //Create publisher

            com.ptc.wvs.common.ui.Publisher pub = new com.ptc.wvs.common.ui.Publisher();

            //Start publisher

            result = pub.doPublish(false, true, objRef, (wt.vc.config.ConfigSpec) null, (wt.vc.config.ConfigSpec) null, true, null, null,

                    com.ptc.wvs.common.ui.Publisher.EPM, pa.toString(), 0);

        }//if

    }//while

   

   

} catch (wt.util.WTException e)

{

    e.printStackTrace();

}

Announcements


Top Tags