It's all about the answers!

Ask a question

Removing artifact from asset


Chamal Panditharatne (112) | asked Oct 09 '19, 5:32 a.m.
edited Oct 09 '19, 5:33 a.m.

 RAM 7.5.3.1 - The following code snippet attempts to delete an artifact from an asset.  It runs without throwing any errors, but it does not actually delete the artifact.  Anyone know what I am doing wrong?


    RAMAsset asset = allMyAssets.get(1);

    try {
        session = new RAMSession(url, user, pass);
        RAMFolderArtifact root = (RAMFolderArtifact) asset.getArtifactsRoot();
        Artifact[] artifacts2 = root.getChildren();

        System.out.println( root.removeArtifact(artifacts2[0]) );  

        session.queueAssetForPut(asset);
        session.putAssets(new NullProgressMonitor());
        
        session.release();

    } catch (RAMRuntimeException e) {
        e.printStackTrace();

    } catch (IOException e) {
        e.printStackTrace();
    }


One answer



permanent link
Chamal Panditharatne (112) | answered Oct 09 '19, 11:49 a.m.

 Looks like there is no problem with my code but a serious problem with the instance of RAM i am trying to run it against.  Oh well....

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.