01-21-2011 02:44 PM
// Webscript 1
var node = companyhome;
var testTxNode = companyhome.childByNamePath("txNodeTest");
if (testTxNode != null)
{
testTxNode.remove();
}
testTxNode = node.createFolder("txNodeTest");
var f1 = testTxNode.createFile('file1.txt');
f1.properties.content.guessMimetype('file1.txt');
var f2 = testTxNode.createFile('file2.txt');
f2.properties.content.guessMimetype('file2.txt');
// Webscript 2
function wait(msecs)
{
var start = new Date().getTime();
var cur = start
while(cur - start < msecs)
{
cur = new Date().getTime();
}
}
var error = "";
var childrens = "";
var testTxNode = companyhome.childByNamePath("txNodeTest");
if (testTxNode == null)
{
error = "Step 1 not passed correctly, Step 2 failed"
}
else
{
var childs = testTxNode.children;
wait(10000);
for each (child in childs)
{
childrens += " - " + child.name;
}
error = "Step 3 not passed correctly, Step 2 Work " + childrens
}
model.error = error;
// Webscript 3
var result = "";
var testTxNode = companyhome.childByNamePath("txNodeTest/file2.txt");
if (testTxNode == null)
{
result = "Step 1 not passed correctly, Step 3 failed";
}
else
{
testTxNode.remove();
result = "passed";
}
model.resultat = result;
01-26-2011 05:28 AM
<transaction>requiresnew</transaction>
Maybe you could solve in this way.02-01-2011 02:49 PM
By default for each WebScript in Alfresco there is a unique transaction.My problem proves that is not true, one webscript change data in other webscript ?
02-02-2011 04:36 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.