<?xml version="1.0" encoding="utf-8"?>
<bpm>
<%	allApps = com.axelor.inject.Beans.get('com.axelor.studio.db.repo.AppBuilderRepository' as Class).all()

	allModels = com.axelor.inject.Beans.get('com.axelor.meta.db.repo.MetaJsonModelRepository' as Class).all()

	allFields = com.axelor.inject.Beans.get('com.axelor.meta.db.repo.MetaJsonFieldRepository' as Class).all()
	
	allSelections = com.axelor.inject.Beans.get('com.axelor.meta.db.repo.MetaSelectRepository' as Class).all()
	
	allCharts = com.axelor.inject.Beans.get('com.axelor.studio.db.repo.ChartBuilderRepository' as Class).all()
	
	allDashboards = com.axelor.inject.Beans.get('com.axelor.studio.db.repo.DashboardBuilderRepository' as Class).all()
	
	allDashlets = com.axelor.inject.Beans.get('com.axelor.studio.db.repo.DashletBuilderRepository' as Class).all()
	
	allActions = com.axelor.inject.Beans.get('com.axelor.studio.db.repo.ActionBuilderRepository' as Class).all()
	
	allMenus = com.axelor.inject.Beans.get('com.axelor.studio.db.repo.MenuBuilderRepository' as Class).all()
	
	allMenusParentMenu = com.axelor.inject.Beans.get('com.axelor.studio.db.repo.MenuBuilderRepository' as Class).all()
	
	allWkfs = com.axelor.inject.Beans.get('com.axelor.studio.db.repo.WkfRepository' as Class).all()
	
	if(__ids__ != null) {
		allApps = allApps.filter('self.id in ?1',__ids__)
		
		allModels = allModels.filter('self.appBuilder.id in ?1',__ids__)
		
		allFields = allFields.filter('self.appBuilder.id in ?1 OR (self.appBuilder is null and self.jsonModel.appBuilder.id in ?1)',__ids__)
		
		allSelections = allSelections.filter('(self.appBuilder.id in ?1 OR self.appBuilder is null) AND self.isCustom = true',__ids__)
					
		allCharts = allCharts.filter('self.appBuilder.id in ?1',__ids__)
				
		allDashboards = allDashboards.filter('self.appBuilder.id in ?1',__ids__)
		
		allDashlets = allDashlets.filter('self.appBuilder.id in ?1 or (self.appBuilder is null and self.dashboardBuilder.appBuilder.id in ?1)',__ids__)
		
		allActions = allActions.filter('self.appBuilder.id in ?1)',__ids__)
		
		allMenus = allMenus.filter('self.appBuilder.id in ?1 and self.parentMenu is null)',__ids__).order('-parentMenu')
		
		allMenusParentMenu = allMenusParentMenu.filter('self.appBuilder.id in ?1 and self.parentMenu is not null',__ids__)
		
		allWkfs = allWkfs.filter('self.appBuilder.id in ?1)',__ids__)
	} else {
		allSelections = allSelections.filter('self.isCustom = true')
	
		allMenus = allMenus.filter('self.parentMenu is null')
		
		allMenusParentMenu = allMenusParentMenu.filter('self.parentMenu is not null')
	}
	
	apps = ""
	allApps.fetch().each({ 
		depends = ""
		it.dependsOnSet?.each({ depend -> depends +="${depend.code}," })
		
		apps += """\n\t<appBuilder>
		<name>${it.name}</name>
		<code>${it.code}</code>
		<description>${it.description}</description>
		<depends>$depends</depends>
		<image name=\"${it.image?.fileName}\">${com.axelor.studio.service.ExportService.getImage(it.image)}</image>
		<sequence>${it.sequence}</sequence>
		\n\t</appBuilder>"""
	})
	
	models = ""
	allModels.fetch().each({ 
		model -> models += """\n\t\t<model>
				\n\t\t\t<name>${model.name}</name>
				\n\t\t\t<title>${model.title}</title>
                \n\t\t\t<onNew>${model.onNew}</onNew>
				\n\t\t\t<onSave>${model.onSave}</onSave>
                \n\t\t\t<menuTitle>${model.menuTitle}</menuTitle>
                \n\t\t\t<menuIcon>${model.menuIcon}</menuIcon>
                \n\t\t\t<menuBackground>${model.menuBackground}</menuBackground>
                \n\t\t\t<menuOrder>${model.menuOrder}</menuOrder>
                \n\t\t\t<menuTop>${model.menuTop}</menuTop>
                \n\t\t\t<menuParent>${model.menuParent?.id}</menuParent>
				\n\t\t\t<appBuilder>${model.appBuilder?.code}</appBuilder>
				\n\t\t</model>"""
	})
	
	fields = ""
	allFields.fetch().each({
		field -> fields += """\n\t\t<field>
				\n\t\t\t<name>${field.name}</name>
				\n\t\t\t<title>${field.title}</title>
				\n\t\t\t<type>${field.type}</type>
				\n\t\t\t<defaultValue>${field.defaultValue}</defaultValue>
				\n\t\t\t<domain>${field.domain}</domain>
				\n\t\t\t<enumType>${field.enumType}</enumType>
				\n\t\t\t<help>${field.help}</help>
				\n\t\t\t<formView>${field.formView}</formView>
				\n\t\t\t<gridView>${field.gridView}</gridView>
				\n\t\t\t<hidden>${field.hidden}</hidden>
				\n\t\t\t<visibleInGrid>${field.visibleInGrid}</visibleInGrid>
				\n\t\t\t<hideIf>${field.hideIf}</hideIf>
				\n\t\t\t<isWkf>${field.isWkf}</isWkf>
				\n\t\t\t<maxSize>${field.maxSize}</maxSize>
				\n\t\t\t<minSize>${field.minSize}</minSize>
				\n\t\t\t<model>${field.model}</model>
				\n\t\t\t<modelField>${field.modelField}</modelField>
				\n\t\t\t<nameField>${field.nameField}</nameField>
				\n\t\t\t<onChange>${field.onChange}</onChange>
				\n\t\t\t<onClick>${field.onClick}</onClick>
				\n\t\t\t<precision>${field.precision}</precision>
				\n\t\t\t<regex>${field.regex}</regex>
				\n\t\t\t<required>${field.required}</required>
				\n\t\t\t<requiredIf>${field.requiredIf}</requiredIf>
				\n\t\t\t<readonly>${field.readonly}</readonly>
				\n\t\t\t<scale>${field.scale}</scale>
				\n\t\t\t<selection>${field.selection}</selection>
				\n\t\t\t<sequence>${field.sequence}</sequence>
				\n\t\t\t<showIf>${field.showIf}</showIf>
				\n\t\t\t<targetModel>${field.targetModel}</targetModel>
				\n\t\t\t<widget>${field.widget}</widget>
				\n\t\t\t<widgetAttrs>""" + field.widgetAttrs + """</widgetAttrs>
				\n\t\t\t<valueExpr>${field.valueExpr != null ? """ + field.valueExpr + """ : ""}</valueExpr>
				\n\t\t\t<jsonModel>${field.jsonModel?.name}</jsonModel>
				\n\t\t\t<targetJsonModel>${field.targetJsonModel?.name}</targetJsonModel>
				\n\t\t\t<appBuilder>${field.appBuilder?.code}</appBuilder>
				\n\t\t\t<modelAppBuilder>${field.jsonModel?.appBuilder?.code}</modelAppBuilder>
				\n\t\t</field>"""
	})
	
	selections = ""
	allSelections.fetch().each({
		selection -> 
				options = ""
				selection.items.each{
					option -> options += """\n\t\t\t\t<option>
					\n\t\t\t\t\t<title>${option.title}</title>
					\n\t\t\t\t\t<value>${option.value}</value>
					\n\t\t\t\t\t<icon>${option.icon}</icon>
					\n\t\t\t\t\t<data>${option.data}</data>
					\n\t\t\t\t\t<order>${option.order}</order>
					\n\t\t\t\t\t<hidden>${option.hidden}</hidden>
					\n\t\t\t\t\t<select>${option.select?.name}</select>
					\n\t\t\t\t</option>"""
				}
				
				selections += """\n\t\t<selection>
				\n\t\t\t<name>${selection.name}</name>
				\n\t\t\t<module>${selection.module}</module>
				\n\t\t\t<priority>${selection.priority}</priority>
				\n\t\t\t<items>$options
				\n\t\t\t</items>
				\n\t\t\t<isCustom>${selection.isCustom}</isCustom>
				\n\t\t\t<appBuilder>${selection.appBuilder?.code}</appBuilder>
				\n\t\t</selection>"""
	})
	
	charts = ""
	allCharts.fetch().each({
		chart -> 
				filters = ""
				chart.filterList.each{
					filter->filters += """\n\t\t\t\t<filter>
					\n\t\t\t\t\t<metaField>${filter.metaField?.name}</metaField>
					\n\t\t\t\t\t<metaJsonField>${filter.metaJsonField?.name}</metaJsonField>
					\n\t\t\t\t\t<operator>${filter.operator}</operator>
					\n\t\t\t\t\t<targetField>${filter.targetField}</targetField>
					\n\t\t\t\t\t<targetType>${filter.targetType}</targetType>
					\n\t\t\t\t\t<value>${filter.value}</value>
					\n\t\t\t\t\t<defaultValue>${filter.defaultValue}</defaultValue>
					\n\t\t\t\t\t<isParameter>${filter.isParameter}</isParameter>
					\n\t\t\t\t\t<isJson>${filter.isJson}</isJson>
					\n\t\t\t\t\t<isTargetJson>${filter.isTargetJson}</isTargetJson>
					\n\t\t\t\t\t<logicOp>${filter.logicOp}</logicOp>
					\n\t\t\t\t</filter>"""
				}
				
				charts += """\n\t\t<chartBuilder>
				\n\t\t\t<name>${chart.name}</name>
				\n\t\t\t<title>${chart.title}</title>
				\n\t\t\t<chartType>${chart.chartType}</chartType>
				\n\t\t\t<isJson>${chart.isJson}</isJson>
				\n\t\t\t<model>${chart.model}</model>
				\n\t\t\t<groupOn>${chart.groupOn?.name}</groupOn>
				\n\t\t\t<groupOnJson>${chart.groupOnJson?.name}</groupOnJson>
				\n\t\t\t<groupDateType>${chart.groupDateType}</groupDateType>
				\n\t\t\t<groupOnTarget>${chart.groupOnTarget}</groupOnTarget>
				\n\t\t\t<groupOnTargetType>${chart.groupOnTargetType}</groupOnTargetType>
				\n\t\t\t<isJsonGroupOn>${chart.isJsonGroupOn}</isJsonGroupOn>
				\n\t\t\t<isJsonAggregateOn>${chart.isJsonAggregateOn}</isJsonAggregateOn>
				\n\t\t\t<isJsonDisplayField>${chart.isJsonDisplayField}</isJsonDisplayField>
				\n\t\t\t<aggregateOnJson>${chart.aggregateOnJson?.name}</aggregateOnJson>
				\n\t\t\t<aggregateOn>${chart.aggregateOn?.name}</aggregateOn>
				\n\t\t\t<aggregateOnTarget>${chart.aggregateOnTarget}</aggregateOnTarget>
				\n\t\t\t<aggregateDateType>${chart.aggregateDateType}</aggregateDateType>
				\n\t\t\t<aggregateOnTargetType>${chart.aggregateOnTargetType}</aggregateOnTargetType>
				\n\t\t\t<displayField>${chart.displayField?.name}</displayField>
				\n\t\t\t<displayFieldJson>${chart.displayFieldJson?.name}</displayFieldJson>
				\n\t\t\t<displayType>${chart.displayType}</displayType>
				\n\t\t\t<filters>$filters
				\n\t\t\t</filters>
				\n\t\t\t<appBuilder>${chart.appBuilder?.code}</appBuilder>
				\n\t\t</chartBuilder>""" 
	})
	
	dashboards = ""
	allDashboards.fetch().each({
		dashboard -> 
				dashboards += """\n\t\t<dashboardBuilder>
				\n\t\t\t<name>${dashboard.name}</name>
				\n\t\t\t<title>${dashboard.title}</title>
				\n\t\t\t<model>${dashboard.model}</model>
				\n\t\t\t<appBuilder>${dashboard.appBuilder?.code}</appBuilder>
				\n\t\t</dashboardBuilder>""" 
				
	})
	
	dashlets = ""
	allDashlets.fetch().each({
		dashlet -> 
				dashlets += """\n\t\t<dashletBuilder>
				\n\t\t\t<name>${dashlet.name}</name>
				\n\t\t\t<metaView>${dashlet.metaView?.name}</metaView>
				\n\t\t\t<action>${dashlet.action?.name}</action>
				\n\t\t\t<dashboardBuilder>${dashlet.dashboardBuilder?.name}</dashboardBuilder>
				\n\t\t\t<sequence>${dashlet.sequence}</sequence>
				\n\t\t\t<viewType>${dashlet.viewType}</viewType>
				\n\t\t\t<colspan>${dashlet.colspan}</colspan>
				\n\t\t\t<paginationLimit>${dashlet.paginationLimit}</paginationLimit>
				\n\t\t\t<appBuilder>${dashlet.appBuilder?.code}</appBuilder>
				\n\t\t\t<parentAppBuilder>${dashlet.dashboardBuilder.appBuilder?.code}</parentAppBuilder>
				\n\t\t</dashletBuilder>""" 
				
	})
	
	actions = ""
	allActions.fetch().each({
		action ->	
				lines = com.axelor.studio.service.ExportService.exportActionBuilderLines(action.lines, 4)
				
				viewParams = com.axelor.studio.service.ExportService.exportActionBuilderLines(action.viewParams, 4)
				
				views = ""
				action.actionBuilderViews.each{
					view->views += """\n\t\t\t\t<view>
					\n\t\t\t\t\t<viewType>${view.viewType}</viewType>
					\n\t\t\t\t\t<viewName>${view.viewName}</viewName>
					\n\t\t\t\t\t<sequence>${view.sequence}</sequence>
					\n\t\t\t\t</view>"""
				}
				
				actions += """\n\t\t<actionBuilder>
				\n\t\t\t<name>${action.name}</name>
				\n\t\t\t<typeSelect>${action.typeSelect}</typeSelect>
				\n\t\t\t<model>${action.model}</model>
				\n\t\t\t<targetModel>${action.targetModel}</targetModel>
				\n\t\t\t<lines>$lines
				\n\t\t\t</lines>
				\n\t\t\t<title>${action.title}</title>
				\n\t\t\t<transactional>${action.transactional}</transactional>
				\n\t\t\t<scriptType>${action.scriptType}</scriptType>
				\n\t\t\t<scriptText>${action.scriptText}</scriptText>
				\n\t\t\t<actionBuilderViews>$views
				\n\t\t\t</actionBuilderViews>
				\n\t\t\t<isJson>${action.isJson}</isJson>
				\n\t\t\t<domainCondition>${action.domainCondition}</domainCondition>
				\n\t\t\t<viewParams>$viewParams
				\n\t\t\t</viewParams>
				\n\t\t\t<menuAction>${action.menuAction}</menuAction>
				\n\t\t\t<appBuilder>${action.appBuilder?.code}</appBuilder>
				\n\t\t</actionBuilder>""" 
				
	})
	
	menus = ""
	allMenus.fetch().each({
		menu ->	
				groups = ""
				menu.groups.each{
					group -> groups += """\n\t\t\t\t<group>${group.code}</group>"""
				}
				
				roles = ""
				menu.roles.each{
					role -> roles += """\n\t\t\t\t<role>${role.name}</role>"""
				}
				
				menus += """\n\t\t<menuBuilder>
				\n\t\t\t<name>${menu.name}</name>
				\n\t\t\t<title>${menu.title}</title>
				\n\t\t\t<icon>${menu.icon}</icon>
				\n\t\t\t<iconBackground>${menu.iconBackground}</iconBackground>
				\n\t\t\t<order>${menu.order}</order>
				\n\t\t\t<tag>${menu.tag}</tag>
				\n\t\t\t<tagGet>${menu.tagGet}</tagGet>
				\n\t\t\t<tagCount>${menu.tagCount}</tagCount>
				\n\t\t\t<tagStyle>${menu.tagStyle}</tagStyle>
				\n\t\t\t<top>${menu.top}</top>
				\n\t\t\t<left>${menu.left}</left>
				\n\t\t\t<mobile>${menu.mobile}</mobile>
				\n\t\t\t<hidden>${menu.hidden}</hidden>
				\n\t\t\t<link>${menu.link}</link>
				\n\t\t\t<conditionToCheck>${menu.conditionToCheck}</conditionToCheck>
				\n\t\t\t<moduleToCheck>${menu.moduleToCheck}</moduleToCheck>
				\n\t\t\t<showAction>${menu.showAction}</showAction>
				\n\t\t\t<groups>$groups
				\n\t\t\t</groups>
				\n\t\t\t<roles>$roles
				\n\t\t\t</roles>
				\n\t\t\t<parentMenu>${menu.parentMenu?.name}</parentMenu>
				\n\t\t\t<actionBuilder>${menu.actionBuilder?.name}</actionBuilder>
				\n\t\t\t<appBuilder>${menu.appBuilder?.code}</appBuilder>
				\n\t\t</menuBuilder>""" 
				
	})
	
	allMenusParentMenu.fetch().each({
		menu ->	
				groups = ""
				menu.groups.each{
					group -> groups += """\n\t\t\t\t<group>${group.code}</group>"""
				}
				
				roles = ""
				menu.roles.each{
					role -> roles += """\n\t\t\t\t<role>${role.name}</role>"""
				}
				
				menus += """\n\t\t<menuBuilder>
				\n\t\t\t<name>${menu.name}</name>
				\n\t\t\t<title>${menu.title}</title>
				\n\t\t\t<icon>${menu.icon}</icon>
				\n\t\t\t<iconBackground>${menu.iconBackground}</iconBackground>
				\n\t\t\t<order>${menu.order}</order>
				\n\t\t\t<tag>${menu.tag}</tag>
				\n\t\t\t<tagGet>${menu.tagGet}</tagGet>
				\n\t\t\t<tagCount>${menu.tagCount}</tagCount>
				\n\t\t\t<tagStyle>${menu.tagStyle}</tagStyle>
				\n\t\t\t<top>${menu.top}</top>
				\n\t\t\t<left>${menu.left}</left>
				\n\t\t\t<mobile>${menu.mobile}</mobile>
				\n\t\t\t<hidden>${menu.hidden}</hidden>
				\n\t\t\t<link>${menu.link}</link>
				\n\t\t\t<conditionToCheck>${menu.conditionToCheck}</conditionToCheck>
				\n\t\t\t<moduleToCheck>${menu.moduleToCheck}</moduleToCheck>
				\n\t\t\t<showAction>${menu.showAction}</showAction>
				\n\t\t\t<groups>$groups
				\n\t\t\t</groups>
				\n\t\t\t<roles>$roles
				\n\t\t\t</roles>
				\n\t\t\t<parentMenu>${menu.parentMenu?.name}</parentMenu>
				\n\t\t\t<actionBuilder>${menu.actionBuilder?.name}</actionBuilder>
				\n\t\t\t<appBuilder>${menu.appBuilder?.code}</appBuilder>
				\n\t\t</menuBuilder>""" 
				
	})
	
	wkfs = ""
	nodes = ""	
	transitions = ""
	allWkfs.fetch().each({
		wkf ->	
				wkf.nodes.each{
					node ->
					node = com.axelor.inject.Beans.get('com.axelor.studio.db.repo.WkfNodeRepository' as Class).find(node.id)
					incoming = ""
					node.incoming.each{
						incom -> incoming += """\n\t\t\t<incoming>${incom.name}</incoming>"""
					}
					
					outgoing = ""
					node.outgoing.each{
						outg -> outgoing += """\n\t\t\t\t<outgoing>${outg.name}</outgoing>"""
					}
					
					roles = ""
					node.roleSet.each{
						role -> roles += """\n\t\t\t<role>${role.name}</role>"""
					}
					
					metaActions = ""
					node.metaActionSet.each{
						action -> metaActions += """\n\t\t\t<action>${action.name}</action>"""
					}
					
					nodes += """\n\t\t\t<node>
						\n\t\t\t<wkf>${node.wkf.name}</wkf>
						\n\t\t\t<name>${node.name}</name>
						\n\t\t\t<title>${node.title}</title>
						\n\t\t\t<xmlId>${node.xmlId}</xmlId>
						\n\t\t\t<metaField>${node.metaField?.name}</metaField>
						\n\t\t\t<metaFieldModel>${node.metaField?.metaModel?.name}</metaFieldModel>
						\n\t\t\t<incomings>$incoming
						\n\t\t\t</incomings>
						\n\t\t\t<outgoings>$outgoing
						\n\t\t\t</outgoings>
						\n\t\t\t<roleSet>$roles
						\n\t\t\t</roleSet>
						\n\t\t\t<metaActionSet>$metaActions
						\n\t\t\t</metaActionSet>
						\n\t\t\t<sequence>${node.sequence}</sequence>
						\n\t\t\t<nodeType>${node.nodeType}</nodeType>
						\n\t\t\t</node>"""
				}
				
				wkf.transitions.each{
					transition ->
					conditions = ""
					transition = com.axelor.inject.Beans.get('com.axelor.studio.db.repo.WkfTransitionRepository' as Class).find(transition.id)
					transition.conditions.each{
						condition-> conditions += """\n\t\t\t<condition>
						\n\t\t\t\t<metaField>${condition.metaField?.name}</metaField>
						\n\t\t\t\t<metaModel>${condition.metaField?.metaModel?.name}</metaModel>
						\n\t\t\t\t<metaJsonField>${condition.metaJsonField?.name}</metaJsonField>
						\n\t\t\t\t<jsonModel>${condition.metaJsonField?.jsonModel?.name}</jsonModel>
						\n\t\t\t\t<operator>${condition.operator}</operator>
						\n\t\t\t\t<targetField>${condition.targetField}</targetField>
						\n\t\t\t\t<targetType>${condition.targetType}</targetType>
						\n\t\t\t\t<value>${condition.value}</value>
						\n\t\t\t\t<isTargetJson>${condition.isTargetJson}</isTargetJson>
						\n\t\t\t\t<logicOp>${condition.logicOp}</logicOp>
						\n\t\t\t\t<model>${condition.metaJsonField?.model}</model>
						\n\t\t\t\t<modelField>${condition.metaJsonField?.modelField}</modelField>
						\n\t\t\t</condition>"""
					}
					
					roles = ""
					transition.roleSet.each{
						role -> roles += """\n\t\t\t\t<role>${role.name}</role>"""
					}
					
					
					transitions += """\n\t\t\t<transition>
						\n\t\t\t<wkf>${transition.wkf.name}</wkf>
						\n\t\t\t<name>${transition.name}</name>
						\n\t\t\t<xmlId>${transition.xmlId}</xmlId>
						\n\t\t\t<isButton>${transition.isButton}</isButton>
						\n\t\t\t<buttonTitle>${transition.buttonTitle}</buttonTitle>
						\n\t\t\t<roleSet>$roles
						\n\t\t\t</roleSet>
						\n\t\t\t<conditions>$conditions
						\n\t\t\t</conditions>
						\n\t\t\t<source>${transition.source?.name}</source>
						\n\t\t\t<target>${transition.target?.name}</target>
						\n\t\t\t<alertTypeSelect>${transition.alertTypeSelect}</alertTypeSelect>
						\n\t\t\t<alertMsg>${transition.alertMsg}</alertMsg>
						\n\t\t\t<successMsg>${transition.successMsg}</successMsg>
						\n\t\t\t</transition>"""
				}
				
				wkfs += """\n\t\t<wkf>
				\n\t\t\t<name>${wkf.name}</name>
				\n\t\t\t<model>${wkf.model}</model>
				\n\t\t\t<jsonField>${wkf.jsonField}</jsonField>
				\n\t\t\t<isJson>${wkf.isJson}</isJson>
				\n\t\t\t<isTrackFlow>${wkf.isTrackFlow}</isTrackFlow>
				\n\t\t\t<statusField>${wkf.statusField?.name}</statusField>
				\n\t\t\t<displayTypeSelect>${wkf.displayTypeSelect}</displayTypeSelect>
				\n\t\t\t<bpmnXml><![CDATA[""" + wkf.bpmnXml + """]]></bpmnXml>
				\n\t\t\t<appBuilder>${wkf.appBuilder.code}</appBuilder>
				\n\t\t</wkf>""" 
				
	})
	
	out << 
	"""
		$apps
		
	<models>
		$models
	</models>
		
	<fields>
		$fields
	</fields>
	
	<selections>
		$selections
	</selections>
	
	<chartBuilders>
		$charts
	</chartBuilders>
	
	<actionBuilders>
		$actions
	</actionBuilders>
	
	<dashboardBuilders>
		$dashboards
	</dashboardBuilders>
	
	<dashletBuilders>
		$dashlets
	</dashletBuilders>
	
	<menuBuilders>
		$menus
	</menuBuilders>
	
	<wkfs>
		$wkfs
	</wkfs>
	
	<nodes>
		$nodes
	</nodes>
	
	<transitions>
		$transitions
	</transitions>
	
	"""
%>
</bpm>
