cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to compile model

subash
Champ in-the-making
Champ in-the-making
Hi,
I am using alfresco 3.3 version.
I am doing the custom workflow using the tutorial 'Packt publishing' alfresco development tutorial.
While creating the model  by enabling 'Model active option '   i am getting the following error.
————————————————————————————————————
Please correct the errors below then click OK.

    * A system error happened during the operation: 05160037 Failed to compile model global:model
—————————————————————————————————————-
My workflow xm l file is given below.
<?xml version="1.0" encoding="UTF-8"?>
<!– Definition of new Model –>
<model name="global:model"
xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!– Optional meta-data about the model –>
<description>Someco Workflow Model</description>
<author>Optaros</author>
<version>1.0</version>
<!– Imports are required to allow references to
definitions in other models –>
<imports>
<import uri=
"http://www.alfresco.org/model/dictionary/1.0"
prefix="dz" />
<import uri="http://www.alfresco.org/model/bpm/1.0"
prefix="bpm" />
</imports>
<!– Introduction of new namespaces defined by this model –>
<namespaces>
<namespace uri="my.new.model"
prefix="global" />
</namespaces>
<types>
<type name="global:reviewTask">
<parent>bpm:startTask</parent>
<properties>
<property name="global:nurse_id">
<title>Nurse No.</title>
<type>d:int</type>
</property>
</properties>
</type>
</types>
</model>


Please tell me where the problem is.

Thanks in Advance
Subash
27 REPLIES 27

rajanigupta
Champ in-the-making
Champ in-the-making
hii

I think there is some configuration problem in ur scenario
have a look at   1–  "http://forums.alfresco.com/en/viewtopic.php?f=34&t=16540"
                         2–http://forums.alfresco.com/en/viewtopic.php?f=34&t=5676
May be this would help you Smiley Happy
Share ur outcome

subash
Champ in-the-making
Champ in-the-making
Hi,

  I want to implement a small custom workflow.That is by using Draft ,Pending,Published  stages.

What ever content we are uploading to Draft it should go for a approval process(pending) and after approving it should goto Published folder.

By assigning a space to a Workflow i think we can use javascript and associate this action to the space.

Please share your thoughts regarding this,i Think u also faced this context and able to overcome the problem.

Thanks
Subash

rajanigupta
Champ in-the-making
Champ in-the-making
hii
urs workflow is u can say same as mine….In my case I have more than 3 approvers.

well have a look at
alfresco\WEB-INF\classes\alfresco\workflow\parallelreview_processdefinition.xml
and
alfresco\WEB-INF\classes\alfresco\workflow\parallelreview_group_processdefinition.xml
I am sure one of them is for ur workflow.

rajanigupta
Champ in-the-making
Champ in-the-making
my case:
I have a workflow having three groups of users i.e CREATOR,APPROVERS,PUBLISHER . The following steps are to be followed

1-CREATOR creates a document and submitt for approval

2-APPROVERS i.e a1,a2,a3 approves the document and pass it for publish (there are three approvers )

3- PUBLISHER publishes it

my workflow definition is second one as I mentioned in the above post and I just added the following script
<task-node name="approved">
<task name="wf:approvedParallelTask" swimlane="initiator" />
<transition to="end">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<runas>admin</runas>
<script>
<variable name="bpm_package" access="read" />
<expression>
var origin = bpm_package.children[0].parent;
var root = origin.parent;
var destination = root.childByNamePath("approved");
                                                      
for (var i=0; i &lt; bpm_package.children.length; i++)
{
     bpm_package.children.move(destination);
}  
</expression>
</script>
</action>
</transition>
</task-node>

subash
Champ in-the-making
Champ in-the-making
Hi,

In the above example given by you,Once the approval is completed pls let me know  how it will available to the publisher ?,And also if publishing is done hw it will move to a different folder ?
I am expecting you the hw to write a custom javascript rule to move the content according to the approval status.Is it the right way ?
Hope You will reply for this.
Thanks
Subash

rajanigupta
Champ in-the-making
Champ in-the-making
yes
for this u have to add a script in ur workflow definition
as i did

please read my post above this post….

n tell if u r using members as a grp or jst as a person

subash
Champ in-the-making
Champ in-the-making
Hi,
i am assigning to a group for approval.

Subash

rajanigupta
Champ in-the-making
Champ in-the-making
so u can use same as mine workflow as I have posted.
I think now its all working :x

or there is any prob?

subash
Champ in-the-making
Champ in-the-making
Hi,
I have added this line in the process definiton file
if (destination == null)
{
destination = origin.createFolder("approved");
}

But after the all approval ,i am not able to see any space named approved.

Thanks'
Subash

rajanigupta
Champ in-the-making
Champ in-the-making
well there is no need to use these lines if u have already created a space named approved…
but if u want to use these lines then u should use like this:
if (destination == null)
{
destination = root.createFolder("approved");
}


I think it should wrk