Unable to generate EDS programmatically - Forum - Corticon - Progress Community

Unable to generate EDS programmatically

 Forum

Unable to generate EDS programmatically

  • Hi All

    Starting a new thread for Precompile Error

    I have drilled down some of the classes and method that are throwing ‘Failed to compile ruleflow ’ exception. Below are the details

    1)      My Class is calling the precompile method in the CcServerImpl Class.

    2)      Precompile method is calling compileRuleflowmethod in the CCServerUtils Class.

    3)      In the  compileRuleflowmethod there is a condition which says that  if ((IRuleflowModelAPI)lIModelAPI).isDeployable() returns false then it will throw an InvalidAssetException("Invalid Asset.  Posted error messages attached to this asset.");

    4)      So I am not able to understand what needs to be done from the code side so that “Failed to compile Ruleflow” will not be thrown.

    Note : I am able to generate .eds file through deployment console. Not sure why I am not able to do it via code.

    Below is the Error detail and screenshot of deployment console

     

    com.corticon.service.ccserver.exception.CcServerInvalidDecisionServiceException: Failed to compile Ruleflow.

    Nested Message: com.corticon.eclipse.studio.rulebuilder.InvalidAssetException: Invalid Asset.  Posted error messages attached to this asset.

    Object state for: null: null

    Object state for: com.corticon.eclipse.server.core.impl.CcServerImpl: com.corticon.eclipse.server.core.impl.CcServerImpl@7cd3f7a0

          at com.corticon.eclipse.server.core.impl.CcServerImpl.precompileDecisionService(CcServerImpl.java:11970)

          at com.CreateEDS.createNewEDS(CreateEDS.java:75)

          at com.CreateEDS.main(CreateEDS.java:30)

    Nested Exception is: com.corticon.eclipse.studio.rulebuilder.InvalidAssetException: Invalid Asset.  Posted error messages attached to this asset.

    Object state for: null: null

    com.corticon.eclipse.studio.rulebuilder.InvalidAssetException: Invalid Asset.  Posted error messages attached to this asset.

    Object state for: null: null

          at com.corticon.eclipse.server.core.CcServerUtils.compileRuleflow(CcServerUtils.java:301)

          at com.corticon.eclipse.server.core.CcServerUtils.compileRuleflow(CcServerUtils.java:239)

          at com.corticon.eclipse.server.core.impl.CcServerImpl.precompileDecisionService(CcServerImpl.java:11960)

          at com.CreateEDS.createNewEDS(CreateEDS.java:75)

          at com.CreateEDS.main(CreateEDS.java:30)

     

  • You should use the deployment API to precompile an EDS file. Here is a quick example class:
     
    package com.progress.corticon.util;
     
    import com.corticon.eclipse.studio.deployment.swing.CcDeployFactory;
    import com.corticon.eclipse.studio.deployment.swing.ICcDeploy;
     
    public class Example {
     
           public static void main(String[] args) {
                  // TODO Auto-generated method stub
                  String strERFPath = "C:/Data/Workspaces/CorticonStudio_5.5/Underwriting/Simple/Ruleflow/NewPolicyProcessing.erf";
                  String strServiceName = "Example";
                  String strOutputPath = "C:/Temp";
                  boolean bOverwriteFile = true;
                 
                  ICcDeploy d = CcDeployFactory.newDeployment();
                  try {
                         d.precompileDecisionService(strERFPath, strServiceName, strOutputPath, bOverwriteFile);
                  } catch (Exception e) {
                         // TODO Auto-generated catch block
                         e.printStackTrace();
                  }
           }
    }
     
    Christopher S. Hogan
    Principal Systems Engineer

    Progress

    PHONE 646-201-4123
    MOBILE 646-243-4282
    www.progress.com
    Twitter
    Facebook
    LinkedIn
    Google+
     
     
    From: sjigesh [mailto:bounce-sjigesh@community.progress.com]
    Sent: Sunday, September 13, 2015 1:23 PM
    To: TU.Corticon@community.progress.com
    Subject: [Technical Users - Corticon] Unable to generate EDS programmatically
     
    Thread created by sjigesh

    Hi All

    Starting a new thread for Precompile Error

    I have drilled down some of the classes and method that are throwing ‘Failed to compile ruleflow ’ exception. Below are the details

    1)      My Class is calling the precompile method in the CcServerImpl Class.

    2)      Precompile method is calling compileRuleflowmethod in the CCServerUtils Class.

    3)      In the  compileRuleflowmethod there is a condition which says that  if ((IRuleflowModelAPI)lIModelAPI).isDeployable() returns false then it will throw an InvalidAssetException("Invalid Asset.  Posted error messages attached to this asset.");

    4)      So I am not able to understand what needs to be done from the code side so that “Failed to compile Ruleflow” will not be thrown.

    Note : I am able to generate .eds file through deployment console. Not sure why I am not able to do it via code.

    Below is the Error detail and screenshot of deployment console

     

    com.corticon.service.ccserver.exception.CcServerInvalidDecisionServiceException: Failed to compile Ruleflow.

    Nested Message: com.corticon.eclipse.studio.rulebuilder.InvalidAssetException: Invalid Asset.  Posted error messages attached to this asset.

    Object state for: null: null

    Object state for: com.corticon.eclipse.server.core.impl.CcServerImpl: com.corticon.eclipse.server.core.impl.CcServerImpl@7cd3f7a0

          at com.corticon.eclipse.server.core.impl.CcServerImpl.precompileDecisionService(CcServerImpl.java:11970)

          at com.CreateEDS.createNewEDS(CreateEDS.java:75)

          at com.CreateEDS.main(CreateEDS.java:30)

    Nested Exception is: com.corticon.eclipse.studio.rulebuilder.InvalidAssetException: Invalid Asset.  Posted error messages attached to this asset.

    Object state for: null: null

    com.corticon.eclipse.studio.rulebuilder.InvalidAssetException: Invalid Asset.  Posted error messages attached to this asset.

    Object state for: null: null

          at com.corticon.eclipse.server.core.CcServerUtils.compileRuleflow(CcServerUtils.java:301)

          at com.corticon.eclipse.server.core.CcServerUtils.compileRuleflow(CcServerUtils.java:239)

          at com.corticon.eclipse.server.core.impl.CcServerImpl.precompileDecisionService(CcServerImpl.java:11960)

          at com.CreateEDS.createNewEDS(CreateEDS.java:75)

          at com.CreateEDS.main(CreateEDS.java:30)

     

    Stop receiving emails on this subject.

    Flag this post as spam/abuse.