Examples of RuleContentText


Examples of org.drools.guvnor.client.rpc.RuleContentText

                                            "funkytest",
                                            "testBuildAssetMultipleFunctionsCallingEachOther",
                                            AssetFormats.FUNCTION );
        RepositoryAssetService repositoryAssetService = getRepositoryAssetService();
        RuleAsset t1 = repositoryAssetService.loadRuleAsset( uuidt1 );
        RuleContentText t1Content = new RuleContentText();
        t1Content.content = "function void t1(){\n";
        t1Content.content += " t2();\n";
        t1Content.content += "}\n";
        t1.content = t1Content;
        repositoryAssetService.checkinVersion( t1 );

        String uuidt2 = impl.createNewRule( "t2",
                                            "",
                                            "funkytest",
                                            "testBuildAssetMultipleFunctionsCallingEachOther",
                                            AssetFormats.FUNCTION );
        RuleAsset t2 = repositoryAssetService.loadRuleAsset( uuidt2 );
        RuleContentText t2Content = new RuleContentText();
        t2Content.content = "function void t2(){\n";
        t2Content.content += " t1();\n";
        t2Content.content += "}\n";
        t2.content = t2Content;
        repositoryAssetService.checkinVersion( t2 );
View Full Code Here

Examples of org.drools.guvnor.client.rpc.RuleContentText

        this(asset);
    }

    public DSLRuleEditor(RuleAsset asset) {

        RuleContentText cont = (RuleContentText) asset.content;

        this.data = cont;
        text = new TextArea();
        text.setWidth( "100%" );
//        text.setHeight( "100%" );
View Full Code Here

Examples of org.drools.guvnor.client.rpc.RuleContentText

        assertTrue(result.getLines().isEmpty());

        RuleBaseCache.getInstance().clearCache();

        // try it with a bad rule
        RuleContentText text = new RuleContentText();
        text.content = "rule 'MyBadRule' \n when Personx() then System.err.println(42); \n end";
        rule.setContent( text );

        result = repositoryAssetService.validateAsset( rule );
        assertNotNull( result );
View Full Code Here

Examples of org.drools.guvnor.client.rpc.RuleContentText

                                            "funkytest",
                                            "testBuildAssetMultipleFunctionsCallingEachOther",
                                            AssetFormats.FUNCTION );
        RepositoryAssetService repositoryAssetService = getRepositoryAssetService();
        RuleAsset t1 = repositoryAssetService.loadRuleAsset( uuidt1 );
        RuleContentText t1Content = new RuleContentText();
        t1Content.content = "function void t1(){\n";
        t1Content.content += " t2();\n";
        t1Content.content += "}\n";
        t1.setContent( t1Content );
        repositoryAssetService.checkinVersion( t1 );

        String uuidt2 = impl.createNewRule( "t2",
                                            "",
                                            "funkytest",
                                            "testBuildAssetMultipleFunctionsCallingEachOther",
                                            AssetFormats.FUNCTION );
        RuleAsset t2 = repositoryAssetService.loadRuleAsset( uuidt2 );
        RuleContentText t2Content = new RuleContentText();
        t2Content.content = "function void t2(){\n";
        t2Content.content += " t1();\n";
        t2Content.content += "}\n";
        t2.setContent( t2Content );
        repositoryAssetService.checkinVersion( t2 );
View Full Code Here

Examples of org.drools.guvnor.client.rpc.RuleContentText

    IRuleAsset {

    public void retrieveAssetContent(RuleAsset asset,
                                     PackageItem pkg,
                                     AssetItem item) throws SerializableException {
        RuleContentText text = new RuleContentText();
        text.content = item.getContent();

        asset.content = text;

    }
View Full Code Here

Examples of org.drools.guvnor.client.rpc.RuleContentText

    }

    public void storeAssetContent(RuleAsset asset,
                                  AssetItem repoAsset) throws SerializableException {

        RuleContentText text = (RuleContentText) asset.content;
        repoAsset.updateContent( text.content );

    }
View Full Code Here

Examples of org.drools.guvnor.client.rpc.RuleContentText

    // Get the name

    InputStream in = item.getBinaryContentAttachment();

    if (in != null) {
      RuleContentText text = new RuleContentText();
      text.content = asset.metaData.name;
      asset.content = text;
    }

  }
View Full Code Here

Examples of org.drools.guvnor.client.rpc.RuleContentText

                                          AssetFormats.DRL );

        RuleAsset asset = repositoryAssetService.loadRuleAsset( uuid );
        assertNotNull( asset.lastModified );
        asset.metaData.coverage = "boo";
        asset.content = new RuleContentText();
        ((RuleContentText) asset.content).content = "yeah !";
        Thread.sleep( 100 );

        // Mock up SEAM contexts
        Map<String, Object> application = new HashMap<String, Object>();
View Full Code Here

Examples of org.drools.guvnor.client.rpc.RuleContentText

                                          AssetFormats.DRL );

        RuleAsset asset = repositoryAssetService.loadRuleAsset( uuid );
        assertNotNull( asset.lastModified );
        asset.metaData.coverage = "boo";
        asset.content = new RuleContentText();
        ((RuleContentText) asset.content).content = "yeah !";
        Thread.sleep( 100 );

        // Mock up SEAM contexts
        Map<String, Object> application = new HashMap<String, Object>();
View Full Code Here

Examples of org.drools.guvnor.client.rpc.RuleContentText

                                                            "workItem1description",
                                                            "testLoadingWorkDefinitionsFromPackageAssetsCategory",
                                                            "testLoadingWorkDefinitionsFromPackageAssets",
                                                            "wid" );
        Asset asset1 = repositoryAssetService.loadRuleAsset( uuid1 );
        RuleContentText content1 = new RuleContentText();
        content1.content = ""
                           + "import org.drools.process.core.datatype.impl.type.StringDataType;\n"
                           + "[\n"
                           + "[\n"
                           + "\"name\" : \"MyTask1\",\n"
                           + "\"parameters\" : [\n"
                           + "\"StringParam\" : new StringDataType()\n"
                           + "],\n"
                           + "\"results\" : [\n"
                           + "\"StringResult\" : new StringDataType()\n"
                           + "],\n"
                           + "\"displayName\" : \"My Task1\","
                           + "\"icon\" : \"\",\n"
                           + "]\n"
                           + "]";

        asset1.setContent( content1 );
        repositoryAssetService.checkinVersion( asset1 );

        //Create #2 Work Item definition
        String uuid2 = serviceImplementation.createNewRule( "workItem2",
                                                            "workItem2description",
                                                            "testLoadingWorkDefinitionsFromPackageAssetsCategory",
                                                            "testLoadingWorkDefinitionsFromPackageAssets",
                                                            "wid" );
        Asset asset2 = repositoryAssetService.loadRuleAsset( uuid2 );
        RuleContentText content2 = new RuleContentText();
        content2.content = ""
                           + "import org.drools.process.core.datatype.impl.type.IntegerDataType;\n"
                           + "[\n"
                           + "[\n"
                           + "\"name\" : \"MyTask2\",\n"
                           + "\"parameters\" : [\n"
                           + "\"IntegerParam\" : new IntegerDataType()\n"
                           + "],\n"
                           + "\"results\" : [\n"
                           + "\"IntegerResult\" : new IntegerDataType()\n"
                           + "],\n"
                           + "\"displayName\" : \"My Task2\","
                           + "\"icon\" : \"\",\n"
                           + "]\n"
                           + "]";

        asset2.setContent( content2 );
        repositoryAssetService.checkinVersion( asset2 );

        //Create #3 Work Item definition
        String uuid3 = serviceImplementation.createNewRule( "workItem3",
                                                            "workItem3description",
                                                            "testLoadingWorkDefinitionsFromPackageAssetsCategory",
                                                            "testLoadingWorkDefinitionsFromPackageAssets",
                                                            "wid" );
        Asset asset3 = repositoryAssetService.loadRuleAsset( uuid3 );
        RuleContentText content3 = new RuleContentText();
        content3.content = ""
                           + "import org.drools.process.core.datatype.impl.type.ObjectDataType;\n"
                           + "[\n"
                           + "[\n"
                           + "\"name\" : \"MyTask3\",\n"
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.