<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns="http://www.jee-soft.cn/bpm/plugins/userCalc/role"
	targetNamespace="http://www.jee-soft.cn/bpm/plugins/userCalc/role"
	xmlns:base="http://www.jee-soft.cn/bpm/plugins/userCalc/base"
	elementFormDefault="qualified">
	<xs:import namespace="http://www.jee-soft.cn/bpm/plugins/userCalc/base"
		schemaLocation="base.xsd" />
	<xs:element name="role">
		<xs:annotation>
			<xs:documentation>角色用户</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:complexContent>
				<xs:extension base="base:abstractLogic">
					<xs:all maxOccurs="1" minOccurs="1">
						<xs:element name="var" type="base:executorVar"
							maxOccurs="1" minOccurs="0" />
						<xs:element name="groups" maxOccurs="1" minOccurs="0">
							<xs:annotation>
								<xs:documentation>指定用户组</xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:attribute name="groupKey" use="required">
									<xs:annotation>
										<xs:documentation>用户组键</xs:documentation>
									</xs:annotation>
								</xs:attribute>
								<xs:attribute name="groupName" use="required">
									<xs:annotation>
										<xs:documentation>用户组名称</xs:documentation>
									</xs:annotation>
								</xs:attribute>
							</xs:complexType>
						</xs:element>

						<xs:element name="roles" minOccurs="1" maxOccurs="1">
							<xs:annotation>
								<xs:documentation>指定角色</xs:documentation>
							</xs:annotation>
							<xs:complexType>
								<xs:attribute name="roleKey" use="required">
									<xs:annotation>
										<xs:documentation>角色键</xs:documentation>
									</xs:annotation>
								</xs:attribute>
								<xs:attribute name="roleName" use="required">
									<xs:annotation>
										<xs:documentation>角色名称</xs:documentation>
									</xs:annotation>
								</xs:attribute>
							</xs:complexType>
						</xs:element>
					</xs:all>
					
					<xs:attribute name="source" type="source" use="required">
						<xs:annotation>
							<xs:documentation>来源分类</xs:documentation>
						</xs:annotation>
					</xs:attribute>

				</xs:extension>
			</xs:complexContent>
		</xs:complexType>
	</xs:element>
	<xs:simpleType name="source">
		<xs:annotation>
			<xs:documentation>人员类型来源</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="none">
				<xs:annotation>
					<xs:documentation>无</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="currentUser">
				<xs:annotation>
					<xs:documentation>当前登录者所在的组织</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="start">
				<xs:annotation>
					<xs:documentation>发起人</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="prev">
				<xs:annotation>
					<xs:documentation>上一步执行人</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="var">
				<xs:annotation>
					<xs:documentation>变量</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="spec">
				<xs:annotation>
					<xs:documentation>指定用户组</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
		</xs:restriction>
	</xs:simpleType>
</xs:schema>
