Code example for QName

Methods: sleep

0
 
    @Test(groups = {"wso2.greg"}, description = "add an artefact with multiple longer lines", enabled = true, dependsOnMethods = "testAddNewRxtFile") 
    public void testAddNewGenericArtifactWithLC() throws Exception { 
        GovernanceUtils.loadGovernanceArtifacts((UserRegistry) governance);
        GenericArtifactManager artifactManager = new GenericArtifactManager(governance, "evlc");
        GenericArtifact artifact = artifactManager.newGovernanceArtifact(new QName
                ("EventWithLC")); 
        artifact.setAttribute("details_venue", "Colombo");
        artifact.setAttribute("details_date", "12/12/2012");
        artifact.setAttribute("details_name", "code");
        artifact.setAttribute("details_author", "testAuthor");
 
        artifact.setAttribute("rules_description", 
        		"0123456789012345678901234567890123456789012345678901234567890120123456789012 More\r\n" +  
        		"012345678901234567890123456789012345678901234567890123456789012\r\n" +  
        	    "012345678901234567890123456789012345678901234567890123456789012 last\r\n"); 
        	             
        artifact.setAttribute("rules_gender", "male");
//        artifact.setAttribute("serviceLifecycle_lifecycleName", "ServiceLifeCycle"); 
        artifactManager.addGenericArtifact(artifact);
 
        eventWithLCArtifcatId = artifact.getId();
        artifact = artifactManager.getGenericArtifact(eventWithLCArtifcatId);
        Thread.sleep(3000);
        assertTrue(artifact.getQName().toString().contains("EventWithLC"), "artifact name not found");
 
        assertTrue(artifact.getAttribute("details_venue").contains("Colombo"),
                "Artifact venue is not found");