├── .gitattributes ├── .gitignore ├── README.md ├── pom.xml ├── postman接口可直接导入BPMN.postman_collection.json ├── src ├── main │ ├── java │ │ └── com │ │ │ └── imooc │ │ │ └── activitiweb │ │ │ ├── ActivitiwebApplication.java │ │ │ ├── DemoApplicationConfiguration.java │ │ │ ├── SecurityUtil.java │ │ │ ├── controller │ │ │ ├── ActivitiHistoryController.java │ │ │ ├── HelloController.java │ │ │ ├── ProcessDefinitionController.java │ │ │ ├── ProcessInstanceController.java │ │ │ ├── TaskController.java │ │ │ └── UserController.java │ │ │ ├── listener │ │ │ ├── ErrServiceTaskListener.java │ │ │ ├── MultInstancesStartListener.java │ │ │ ├── MultInstancesTKListener.java │ │ │ ├── PiListener.java │ │ │ ├── ServiceTaskListener1.java │ │ │ ├── ServiceTaskListener2.java │ │ │ ├── TkListener1.java │ │ │ └── TkListener2.java │ │ │ ├── mapper │ │ │ ├── ActivitiMapper.java │ │ │ └── UserInfoBeanMapper.java │ │ │ ├── pojo │ │ │ ├── Act_ru_task.java │ │ │ └── UserInfoBean.java │ │ │ ├── security │ │ │ ├── ActivitiSecurityConfig.java │ │ │ ├── ActivitiSecurityController.java │ │ │ ├── LoginFailureHandler.java │ │ │ ├── LoginSuccessHandler.java │ │ │ ├── MyUserDetailsService.java │ │ │ ├── SimpleResponse.java │ │ │ └── SwaggerConfig.java │ │ │ └── util │ │ │ ├── AjaxResponse.java │ │ │ ├── GlobalConfig.java │ │ │ └── PathMapping.java │ └── resources │ │ ├── application.properties │ │ ├── application.yml │ │ ├── logback-spring.xml │ │ ├── resources │ │ ├── bpmn │ │ │ └── e387c111-4c96-4f64-a759-1238e9faa40b.bpmn │ │ ├── bpmnjs │ │ │ ├── .gitignore │ │ │ ├── .npmrc │ │ │ ├── Gruntfile.js │ │ │ ├── README.md │ │ │ ├── app │ │ │ │ ├── favicon.ico │ │ │ │ ├── index.html │ │ │ │ └── index.js │ │ │ ├── dist │ │ │ │ ├── css │ │ │ │ │ ├── app.css │ │ │ │ │ └── diagram-js.css │ │ │ │ ├── favicon.ico │ │ │ │ ├── index.html │ │ │ │ ├── index.js │ │ │ │ └── vendor │ │ │ │ │ ├── bpmn-font │ │ │ │ │ ├── css │ │ │ │ │ │ ├── bpmn-codes.css │ │ │ │ │ │ ├── bpmn-embedded.css │ │ │ │ │ │ └── bpmn.css │ │ │ │ │ └── font │ │ │ │ │ │ ├── bpmn.eot │ │ │ │ │ │ ├── bpmn.svg │ │ │ │ │ │ ├── bpmn.ttf │ │ │ │ │ │ ├── bpmn.woff │ │ │ │ │ │ └── bpmn.woff2 │ │ │ │ │ └── diagram-js.css │ │ │ ├── package.json │ │ │ ├── resources │ │ │ │ ├── activiti.json │ │ │ │ ├── customControls │ │ │ │ │ ├── CustomContextPad.js │ │ │ │ │ ├── CustomPalette.js │ │ │ │ │ └── index.js │ │ │ │ ├── customTranslate │ │ │ │ │ ├── customTranslate.js │ │ │ │ │ └── translationsGerman.js │ │ │ │ ├── newDiagram.bpmn │ │ │ │ ├── properties-panel │ │ │ │ │ ├── PropertiesActivator.js │ │ │ │ │ ├── PropertiesPanel.js │ │ │ │ │ ├── Utils.js │ │ │ │ │ ├── cmd │ │ │ │ │ │ ├── CreateAndReferenceHandler.js │ │ │ │ │ │ ├── CreateBusinessObjectListHandler.js │ │ │ │ │ │ ├── MultiCommandHandler.js │ │ │ │ │ │ ├── UpdateBusinessObjectHandler.js │ │ │ │ │ │ ├── UpdateBusinessObjectListHandler.js │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── factory │ │ │ │ │ │ ├── CheckboxEntryFactory.js │ │ │ │ │ │ ├── ComboEntryFactory.js │ │ │ │ │ │ ├── EntryFactory.js │ │ │ │ │ │ ├── EntryFieldDescription.js │ │ │ │ │ │ ├── LabelFactory.js │ │ │ │ │ │ ├── LinkEntryFactory.js │ │ │ │ │ │ ├── SelectEntryFactory.js │ │ │ │ │ │ ├── TableEntryFactory.js │ │ │ │ │ │ ├── TextBoxEntryFactory.js │ │ │ │ │ │ ├── TextInputEntryFactory.js │ │ │ │ │ │ └── ValidationAwareTextInput.js │ │ │ │ │ ├── helper │ │ │ │ │ │ ├── AsyncCapableHelper.js │ │ │ │ │ │ ├── CategoryHelper.js │ │ │ │ │ │ ├── CmdHelper.js │ │ │ │ │ │ ├── ElementHelper.js │ │ │ │ │ │ ├── EventDefinitionHelper.js │ │ │ │ │ │ ├── ExtensionElementsHelper.js │ │ │ │ │ │ ├── FormHelper.js │ │ │ │ │ │ ├── ImplementationTypeHelper.js │ │ │ │ │ │ ├── InputOutputHelper.js │ │ │ │ │ │ └── ParticipantHelper.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── popup.js │ │ │ │ │ └── provider │ │ │ │ │ │ ├── activiti │ │ │ │ │ │ ├── ActivitiPropertiesProvider.js │ │ │ │ │ │ ├── element-templates │ │ │ │ │ │ │ ├── CreateHelper.js │ │ │ │ │ │ │ ├── CustomElementsPropertiesActivator.js │ │ │ │ │ │ │ ├── ElementTemplates.js │ │ │ │ │ │ │ ├── ElementTemplatesLoader.js │ │ │ │ │ │ │ ├── Helper.js │ │ │ │ │ │ │ ├── Validator.js │ │ │ │ │ │ │ ├── cmd │ │ │ │ │ │ │ │ ├── ChangeElementTemplateHandler.js │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ ├── parts │ │ │ │ │ │ │ │ ├── ChooserProps.js │ │ │ │ │ │ │ │ └── CustomProps.js │ │ │ │ │ │ │ └── util │ │ │ │ │ │ │ │ └── validate.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── parts │ │ │ │ │ │ │ ├── AsynchronousContinuationProps.js │ │ │ │ │ │ │ ├── CallActivityProps.js │ │ │ │ │ │ │ ├── CandidateStarterProps.js │ │ │ │ │ │ │ ├── ConditionalProps.js │ │ │ │ │ │ │ ├── ConnectorDetailProps.js │ │ │ │ │ │ │ ├── ConnectorInputOutputParameterProps.js │ │ │ │ │ │ │ ├── ConnectorInputOutputProps.js │ │ │ │ │ │ │ ├── ErrorEventProps.js │ │ │ │ │ │ │ ├── ExternalTaskConfigurationProps.js │ │ │ │ │ │ │ ├── FieldInjectionProps.js │ │ │ │ │ │ │ ├── FormProps.js │ │ │ │ │ │ │ ├── HistoryTimeToLiveProps.js │ │ │ │ │ │ │ ├── InputOutputParameterProps.js │ │ │ │ │ │ │ ├── InputOutputProps.js │ │ │ │ │ │ │ ├── JobConfigurationProps.js │ │ │ │ │ │ │ ├── ListenerDetailProps.js │ │ │ │ │ │ │ ├── ListenerFieldInjectionProps.js │ │ │ │ │ │ │ ├── ListenerProps.js │ │ │ │ │ │ │ ├── MultiInstanceLoopProps.js │ │ │ │ │ │ │ ├── PropertiesProps.js │ │ │ │ │ │ │ ├── ScriptTaskProps.js │ │ │ │ │ │ │ ├── ServiceTaskDelegateProps.js │ │ │ │ │ │ │ ├── StartEventInitiator.js │ │ │ │ │ │ │ ├── TasklistProps.js │ │ │ │ │ │ │ ├── UserTaskProps.js │ │ │ │ │ │ │ ├── VariableMappingProps.js │ │ │ │ │ │ │ ├── VersionTagProps.js │ │ │ │ │ │ │ └── implementation │ │ │ │ │ │ │ ├── AsyncContinuation.js │ │ │ │ │ │ │ ├── Callable.js │ │ │ │ │ │ │ ├── CandidateStarter.js │ │ │ │ │ │ │ ├── Delegate.js │ │ │ │ │ │ │ ├── ErrorEventDefinition.js │ │ │ │ │ │ │ ├── ExtensionElements.js │ │ │ │ │ │ │ ├── External.js │ │ │ │ │ │ │ ├── ExternalTaskPriority.js │ │ │ │ │ │ │ ├── FieldInjection.js │ │ │ │ │ │ │ ├── HistoryTimeToLive.js │ │ │ │ │ │ │ ├── ImplementationType.js │ │ │ │ │ │ │ ├── InputOutput.js │ │ │ │ │ │ │ ├── InputOutputParameter.js │ │ │ │ │ │ │ ├── JobPriority.js │ │ │ │ │ │ │ ├── JobRetryTimeCycle.js │ │ │ │ │ │ │ ├── Listener.js │ │ │ │ │ │ │ ├── MultiInstanceLoopCharacteristics.js │ │ │ │ │ │ │ ├── Properties.js │ │ │ │ │ │ │ ├── ResultVariable.js │ │ │ │ │ │ │ ├── Script.js │ │ │ │ │ │ │ └── Tasklist.js │ │ │ │ │ │ └── bpmn │ │ │ │ │ │ ├── BpmnPropertiesProvider.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── parts │ │ │ │ │ │ ├── DocumentationProps.js │ │ │ │ │ │ ├── EventProps.js │ │ │ │ │ │ ├── ExecutableProps.js │ │ │ │ │ │ ├── IdProps.js │ │ │ │ │ │ ├── LinkProps.js │ │ │ │ │ │ ├── NameProps.js │ │ │ │ │ │ ├── ProcessProps.js │ │ │ │ │ │ └── implementation │ │ │ │ │ │ ├── CompensateEventDefinition.js │ │ │ │ │ │ ├── ConditionalEventDefinition.js │ │ │ │ │ │ ├── ElementReferenceProperty.js │ │ │ │ │ │ ├── ErrorEventDefinition.js │ │ │ │ │ │ ├── EscalationEventDefinition.js │ │ │ │ │ │ ├── EventDefinitionReference.js │ │ │ │ │ │ ├── MessageEventDefinition.js │ │ │ │ │ │ ├── Name.js │ │ │ │ │ │ ├── SignalEventDefinition.js │ │ │ │ │ │ └── TimerEventDefinition.js │ │ │ │ └── tools.js │ │ │ └── styles │ │ │ │ └── app.less │ │ ├── demo-login.html │ │ ├── demo-login1.html │ │ ├── failure.html │ │ ├── index.html │ │ ├── layuimini │ │ │ ├── .gitattributes │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── api │ │ │ │ ├── clear.json │ │ │ │ ├── init.json │ │ │ │ ├── menus.json │ │ │ │ ├── table.json │ │ │ │ ├── tableSelect.json │ │ │ │ └── upload.json │ │ │ ├── css │ │ │ │ ├── admins.css │ │ │ │ ├── layuimini.css │ │ │ │ ├── public.css │ │ │ │ └── themes │ │ │ │ │ └── default.css │ │ │ ├── images │ │ │ │ ├── bg.jpg │ │ │ │ ├── captcha.jpg │ │ │ │ ├── favicon.ico │ │ │ │ └── logo.png │ │ │ ├── index.html │ │ │ ├── js │ │ │ │ ├── ManualPaging.js │ │ │ │ ├── lay-config.js │ │ │ │ └── lay-module │ │ │ │ │ ├── echarts │ │ │ │ │ ├── echarts.js │ │ │ │ │ └── echartsTheme.js │ │ │ │ │ ├── iconPicker │ │ │ │ │ └── iconPickerFa.js │ │ │ │ │ ├── layarea │ │ │ │ │ └── layarea.js │ │ │ │ │ ├── layuiadmin │ │ │ │ │ └── admin.js │ │ │ │ │ ├── layuimini │ │ │ │ │ ├── miniAdmin.js │ │ │ │ │ ├── miniMenu.js │ │ │ │ │ ├── miniTab.js │ │ │ │ │ ├── miniTheme.js │ │ │ │ │ └── miniTongji.js │ │ │ │ │ ├── step-lay │ │ │ │ │ ├── step.css │ │ │ │ │ └── step.js │ │ │ │ │ ├── tableSelect │ │ │ │ │ └── tableSelect.js │ │ │ │ │ ├── treetable-lay │ │ │ │ │ ├── treetable.css │ │ │ │ │ └── treetable.js │ │ │ │ │ └── wangEditor │ │ │ │ │ ├── fonts │ │ │ │ │ └── w-e-icon.woff │ │ │ │ │ ├── wangEditor.css │ │ │ │ │ ├── wangEditor.js │ │ │ │ │ ├── wangEditor.min.css │ │ │ │ │ ├── wangEditor.min.js │ │ │ │ │ └── wangEditor.min.js.map │ │ │ ├── lib │ │ │ │ ├── font-awesome-4.7.0 │ │ │ │ │ ├── HELP-US-OUT.txt │ │ │ │ │ ├── css │ │ │ │ │ │ ├── font-awesome.css │ │ │ │ │ │ └── font-awesome.min.css │ │ │ │ │ ├── fonts │ │ │ │ │ │ ├── FontAwesome.otf │ │ │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ │ │ ├── fontawesome-webfont.svg │ │ │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ │ │ └── fontawesome-webfont.woff2 │ │ │ │ │ ├── less │ │ │ │ │ │ ├── animated.less │ │ │ │ │ │ ├── bordered-pulled.less │ │ │ │ │ │ ├── core.less │ │ │ │ │ │ ├── fixed-width.less │ │ │ │ │ │ ├── font-awesome.less │ │ │ │ │ │ ├── icons.less │ │ │ │ │ │ ├── larger.less │ │ │ │ │ │ ├── list.less │ │ │ │ │ │ ├── mixins.less │ │ │ │ │ │ ├── path.less │ │ │ │ │ │ ├── rotated-flipped.less │ │ │ │ │ │ ├── screen-reader.less │ │ │ │ │ │ ├── stacked.less │ │ │ │ │ │ └── variables.less │ │ │ │ │ └── scss │ │ │ │ │ │ ├── _animated.scss │ │ │ │ │ │ ├── _bordered-pulled.scss │ │ │ │ │ │ ├── _core.scss │ │ │ │ │ │ ├── _fixed-width.scss │ │ │ │ │ │ ├── _icons.scss │ │ │ │ │ │ ├── _larger.scss │ │ │ │ │ │ ├── _list.scss │ │ │ │ │ │ ├── _mixins.scss │ │ │ │ │ │ ├── _path.scss │ │ │ │ │ │ ├── _rotated-flipped.scss │ │ │ │ │ │ ├── _screen-reader.scss │ │ │ │ │ │ ├── _stacked.scss │ │ │ │ │ │ ├── _variables.scss │ │ │ │ │ │ └── font-awesome.scss │ │ │ │ ├── jq-module │ │ │ │ │ ├── jquery.particleground.min.js │ │ │ │ │ ├── paigusu.min.js │ │ │ │ │ └── zyupload │ │ │ │ │ │ ├── zyupload-1.0.0.min.css │ │ │ │ │ │ └── zyupload-1.0.0.min.js │ │ │ │ ├── jquery-3.4.1 │ │ │ │ │ └── jquery-3.4.1.min.js │ │ │ │ └── layui-v2.5.5 │ │ │ │ │ ├── css │ │ │ │ │ ├── layui.css │ │ │ │ │ ├── layui.mobile.css │ │ │ │ │ └── modules │ │ │ │ │ │ ├── code.css │ │ │ │ │ │ ├── laydate │ │ │ │ │ │ └── default │ │ │ │ │ │ │ └── laydate.css │ │ │ │ │ │ └── layer │ │ │ │ │ │ └── default │ │ │ │ │ │ ├── icon-ext.png │ │ │ │ │ │ ├── icon.png │ │ │ │ │ │ ├── layer.css │ │ │ │ │ │ ├── loading-0.gif │ │ │ │ │ │ ├── loading-1.gif │ │ │ │ │ │ └── loading-2.gif │ │ │ │ │ ├── font │ │ │ │ │ ├── iconfont.eot │ │ │ │ │ ├── iconfont.svg │ │ │ │ │ ├── iconfont.ttf │ │ │ │ │ ├── iconfont.woff │ │ │ │ │ └── iconfont.woff2 │ │ │ │ │ ├── images │ │ │ │ │ └── face │ │ │ │ │ │ ├── 0.gif │ │ │ │ │ │ ├── 1.gif │ │ │ │ │ │ ├── 10.gif │ │ │ │ │ │ ├── 11.gif │ │ │ │ │ │ ├── 12.gif │ │ │ │ │ │ ├── 13.gif │ │ │ │ │ │ ├── 14.gif │ │ │ │ │ │ ├── 15.gif │ │ │ │ │ │ ├── 16.gif │ │ │ │ │ │ ├── 17.gif │ │ │ │ │ │ ├── 18.gif │ │ │ │ │ │ ├── 19.gif │ │ │ │ │ │ ├── 2.gif │ │ │ │ │ │ ├── 20.gif │ │ │ │ │ │ ├── 21.gif │ │ │ │ │ │ ├── 22.gif │ │ │ │ │ │ ├── 23.gif │ │ │ │ │ │ ├── 24.gif │ │ │ │ │ │ ├── 25.gif │ │ │ │ │ │ ├── 26.gif │ │ │ │ │ │ ├── 27.gif │ │ │ │ │ │ ├── 28.gif │ │ │ │ │ │ ├── 29.gif │ │ │ │ │ │ ├── 3.gif │ │ │ │ │ │ ├── 30.gif │ │ │ │ │ │ ├── 31.gif │ │ │ │ │ │ ├── 32.gif │ │ │ │ │ │ ├── 33.gif │ │ │ │ │ │ ├── 34.gif │ │ │ │ │ │ ├── 35.gif │ │ │ │ │ │ ├── 36.gif │ │ │ │ │ │ ├── 37.gif │ │ │ │ │ │ ├── 38.gif │ │ │ │ │ │ ├── 39.gif │ │ │ │ │ │ ├── 4.gif │ │ │ │ │ │ ├── 40.gif │ │ │ │ │ │ ├── 41.gif │ │ │ │ │ │ ├── 42.gif │ │ │ │ │ │ ├── 43.gif │ │ │ │ │ │ ├── 44.gif │ │ │ │ │ │ ├── 45.gif │ │ │ │ │ │ ├── 46.gif │ │ │ │ │ │ ├── 47.gif │ │ │ │ │ │ ├── 48.gif │ │ │ │ │ │ ├── 49.gif │ │ │ │ │ │ ├── 5.gif │ │ │ │ │ │ ├── 50.gif │ │ │ │ │ │ ├── 51.gif │ │ │ │ │ │ ├── 52.gif │ │ │ │ │ │ ├── 53.gif │ │ │ │ │ │ ├── 54.gif │ │ │ │ │ │ ├── 55.gif │ │ │ │ │ │ ├── 56.gif │ │ │ │ │ │ ├── 57.gif │ │ │ │ │ │ ├── 58.gif │ │ │ │ │ │ ├── 59.gif │ │ │ │ │ │ ├── 6.gif │ │ │ │ │ │ ├── 60.gif │ │ │ │ │ │ ├── 61.gif │ │ │ │ │ │ ├── 62.gif │ │ │ │ │ │ ├── 63.gif │ │ │ │ │ │ ├── 64.gif │ │ │ │ │ │ ├── 65.gif │ │ │ │ │ │ ├── 66.gif │ │ │ │ │ │ ├── 67.gif │ │ │ │ │ │ ├── 68.gif │ │ │ │ │ │ ├── 69.gif │ │ │ │ │ │ ├── 7.gif │ │ │ │ │ │ ├── 70.gif │ │ │ │ │ │ ├── 71.gif │ │ │ │ │ │ ├── 8.gif │ │ │ │ │ │ └── 9.gif │ │ │ │ │ ├── lay │ │ │ │ │ └── modules │ │ │ │ │ │ ├── carousel.js │ │ │ │ │ │ ├── code.js │ │ │ │ │ │ ├── colorpicker.js │ │ │ │ │ │ ├── element.js │ │ │ │ │ │ ├── flow.js │ │ │ │ │ │ ├── form.js │ │ │ │ │ │ ├── jquery.js │ │ │ │ │ │ ├── laydate.js │ │ │ │ │ │ ├── layedit.js │ │ │ │ │ │ ├── layer.js │ │ │ │ │ │ ├── laypage.js │ │ │ │ │ │ ├── laytpl.js │ │ │ │ │ │ ├── mobile.js │ │ │ │ │ │ ├── rate.js │ │ │ │ │ │ ├── slider.js │ │ │ │ │ │ ├── table.js │ │ │ │ │ │ ├── transfer.js │ │ │ │ │ │ ├── tree.js │ │ │ │ │ │ ├── upload.js │ │ │ │ │ │ └── util.js │ │ │ │ │ ├── layui.all.js │ │ │ │ │ └── layui.js │ │ │ └── page │ │ │ │ ├── 404.html │ │ │ │ ├── HistoryTasks.html │ │ │ │ ├── ProcessDefinition.html │ │ │ │ ├── ProcessDeployments.html │ │ │ │ ├── ProcessInstance.html │ │ │ │ ├── ToDoTasks.html │ │ │ │ ├── area.html │ │ │ │ ├── button.html │ │ │ │ ├── color-select.html │ │ │ │ ├── editor.html │ │ │ │ ├── form-step.html │ │ │ │ ├── form.html │ │ │ │ ├── icon-picker.html │ │ │ │ ├── icon.html │ │ │ │ ├── layer.html │ │ │ │ ├── login-1.html │ │ │ │ ├── login-2.html │ │ │ │ ├── menu.html │ │ │ │ ├── setting.html │ │ │ │ ├── table-select.html │ │ │ │ ├── table.html │ │ │ │ ├── table │ │ │ │ ├── FormDataShow.html │ │ │ │ ├── add.html │ │ │ │ ├── addDeployment.html │ │ │ │ └── edit.html │ │ │ │ ├── upload.html │ │ │ │ ├── user-password.html │ │ │ │ ├── user-setting.html │ │ │ │ ├── welcome-1.html │ │ │ │ ├── welcome-2.html │ │ │ │ └── welcome-3.html │ │ ├── success.html │ │ └── uploadfile │ │ │ ├── 1.html │ │ │ ├── 169e48d6-2438-4bcb-adea-c745733492a2.docx │ │ │ ├── 4d386e74-f96b-4b42-b838-cd755ccfa17a.docx │ │ │ └── DocPush.bpmn │ │ └── static │ │ └── git_show │ │ ├── 0001.jpg │ │ ├── 0002.gif │ │ ├── 0003.png │ │ └── 0004.png └── test │ └── java │ └── com │ └── imooc │ └── activitiweb │ ├── ActivitiwebApplicationTests.java │ ├── ActivitiwebGroupTest.java │ ├── ActivitiwebTest.java │ ├── Part1_Deployment.java │ ├── Part2_ProcessDefinition.java │ ├── Part3_ProcessInstance.java │ ├── Part4_Task.java │ └── Part5_HistoricTaskInstance.java ├── user.sql └── 数据字典activiti7.pdm /.gitattributes: -------------------------------------------------------------------------------- 1 | *.js linguist-language=java 2 | *.css linguist-language=java 3 | *.html linguist-language=java -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /src/main/java/com/imooc/activitiweb/ActivitiwebApplication.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class ActivitiwebApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(ActivitiwebApplication.class, args); 11 | } 12 | 13 | } 14 | 15 | 16 | /* 17 | 18 | import org.springframework.boot.SpringApplication; 19 | import org.springframework.boot.autoconfigure.SpringBootApplication; 20 | import org.springframework.boot.builder.SpringApplicationBuilder; 21 | import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; 22 | 23 | @SpringBootApplication(scanBasePackages = {"com.imooc.activitiweb"}) 24 | public class ActivitiwebApplication extends SpringBootServletInitializer { 25 | @Override 26 | protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { 27 | return builder.sources(ActivitiwebApplication.class); 28 | } 29 | 30 | public static void main(String[] args) { 31 | SpringApplication.run(ActivitiwebApplication.class, args); 32 | } 33 | 34 | }*/ 35 | -------------------------------------------------------------------------------- /src/main/java/com/imooc/activitiweb/DemoApplicationConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.security.core.authority.SimpleGrantedAuthority; 6 | import org.springframework.security.core.userdetails.User; 7 | import org.springframework.security.core.userdetails.UserDetailsService; 8 | import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; 9 | import org.springframework.security.crypto.password.PasswordEncoder; 10 | import org.springframework.security.provisioning.InMemoryUserDetailsManager; 11 | 12 | import java.util.Arrays; 13 | import java.util.List; 14 | import java.util.stream.Collectors; 15 | 16 | //@Configuration 17 | public class DemoApplicationConfiguration { 18 | 19 | private Logger logger = LoggerFactory.getLogger(DemoApplicationConfiguration.class); 20 | 21 | // @Bean 22 | public UserDetailsService myUserDetailsService() { 23 | 24 | InMemoryUserDetailsManager inMemoryUserDetailsManager = new InMemoryUserDetailsManager(); 25 | 26 | String[][] usersGroupsAndRoles = { 27 | {"salaboy", "password", "ROLE_ACTIVITI_USER", "GROUP_activitiTeam"}, 28 | {"bajie", "password", "ROLE_ACTIVITI_USER", "GROUP_activitiTeam"}, 29 | {"wukong", "password", "ROLE_ACTIVITI_USER", "GROUP_activitiTeam"}, 30 | {"other", "password", "ROLE_ACTIVITI_USER", "GROUP_otherTeam"}, 31 | {"admin", "password", "ROLE_ACTIVITI_ADMIN"}, 32 | }; 33 | 34 | for (String[] user : usersGroupsAndRoles) { 35 | List authoritiesStrings = Arrays.asList(Arrays.copyOfRange(user, 2, user.length)); 36 | logger.info("> Registering new user: " + user[0] + " with the following Authorities[" + authoritiesStrings + "]"); 37 | inMemoryUserDetailsManager.createUser(new User(user[0], passwordEncoder().encode(user[1]), 38 | authoritiesStrings.stream().map(s -> new SimpleGrantedAuthority(s)).collect(Collectors.toList()))); 39 | } 40 | 41 | 42 | return inMemoryUserDetailsManager; 43 | 44 | 45 | } 46 | 47 | 48 | // @Bean 49 | public PasswordEncoder passwordEncoder() { 50 | return new BCryptPasswordEncoder(); 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/com/imooc/activitiweb/SecurityUtil.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.security.core.Authentication; 7 | import org.springframework.security.core.GrantedAuthority; 8 | import org.springframework.security.core.context.SecurityContextHolder; 9 | import org.springframework.security.core.context.SecurityContextImpl; 10 | import org.springframework.security.core.userdetails.UserDetails; 11 | import org.springframework.security.core.userdetails.UserDetailsService; 12 | import org.springframework.stereotype.Component; 13 | 14 | import java.util.Collection; 15 | 16 | @Component 17 | public class SecurityUtil { 18 | 19 | private Logger logger = LoggerFactory.getLogger(SecurityUtil.class); 20 | 21 | @Autowired 22 | private UserDetailsService userDetailsService; 23 | 24 | public void logInAs(String username) { 25 | 26 | UserDetails user = userDetailsService.loadUserByUsername(username); 27 | if (user == null) { 28 | throw new IllegalStateException("User " + username + " doesn't exist, please provide a valid user"); 29 | } 30 | logger.info("> Logged in as: " + username); 31 | SecurityContextHolder.setContext(new SecurityContextImpl(new Authentication() { 32 | @Override 33 | public Collection getAuthorities() { 34 | return user.getAuthorities(); 35 | } 36 | 37 | @Override 38 | public Object getCredentials() { 39 | return user.getPassword(); 40 | } 41 | 42 | @Override 43 | public Object getDetails() { 44 | return user; 45 | } 46 | 47 | @Override 48 | public Object getPrincipal() { 49 | return user; 50 | } 51 | 52 | @Override 53 | public boolean isAuthenticated() { 54 | return true; 55 | } 56 | 57 | @Override 58 | public void setAuthenticated(boolean isAuthenticated) throws IllegalArgumentException { 59 | 60 | } 61 | 62 | @Override 63 | public String getName() { 64 | return user.getUsername(); 65 | } 66 | })); 67 | org.activiti.engine.impl.identity.Authentication.setAuthenticatedUserId(username); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/main/java/com/imooc/activitiweb/controller/UserController.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb.controller; 2 | 3 | import com.imooc.activitiweb.mapper.ActivitiMapper; 4 | import com.imooc.activitiweb.util.AjaxResponse; 5 | import com.imooc.activitiweb.util.GlobalConfig; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RestController; 10 | 11 | import java.util.HashMap; 12 | import java.util.List; 13 | 14 | @RestController 15 | @RequestMapping("/user") 16 | public class UserController { 17 | 18 | @Autowired 19 | ActivitiMapper mapper; 20 | 21 | //获取用户 22 | @GetMapping(value = "/getUsers") 23 | public AjaxResponse getUsers() { 24 | try { 25 | List> userList = mapper.selectUser(); 26 | 27 | 28 | return AjaxResponse.AjaxData(GlobalConfig.ResponseCode.SUCCESS.getCode(), 29 | GlobalConfig.ResponseCode.SUCCESS.getDesc(), userList); 30 | 31 | 32 | } catch (Exception e) { 33 | return AjaxResponse.AjaxData(GlobalConfig.ResponseCode.ERROR.getCode(), 34 | "获取用户列表失败", e.toString()); 35 | } 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/imooc/activitiweb/listener/ErrServiceTaskListener.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb.listener; 2 | 3 | import org.activiti.engine.delegate.BpmnError; 4 | import org.activiti.engine.delegate.DelegateExecution; 5 | import org.activiti.engine.delegate.JavaDelegate; 6 | 7 | public class ErrServiceTaskListener implements JavaDelegate { 8 | 9 | @Override 10 | public void execute(DelegateExecution execution) { 11 | throw new BpmnError("Error_21ldg70"); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/imooc/activitiweb/listener/MultInstancesStartListener.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb.listener; 2 | 3 | import org.activiti.engine.delegate.DelegateExecution; 4 | import org.activiti.engine.delegate.ExecutionListener; 5 | 6 | import java.util.ArrayList; 7 | 8 | public class MultInstancesStartListener implements ExecutionListener { 9 | 10 | @Override 11 | public void notify(DelegateExecution execution) { 12 | ArrayList assigneeList = new ArrayList<>(); 13 | assigneeList.add("bajie"); 14 | assigneeList.add("wukong"); 15 | assigneeList.add("salaboy"); 16 | 17 | execution.setVariable("assigneeList",assigneeList); 18 | 19 | //execution.setVariable("isPass",0); 20 | 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/imooc/activitiweb/listener/MultInstancesTKListener.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb.listener; 2 | 3 | import org.activiti.engine.delegate.DelegateTask; 4 | import org.activiti.engine.delegate.TaskListener; 5 | 6 | public class MultInstancesTKListener implements TaskListener { 7 | @Override 8 | public void notify(DelegateTask delegateTask) { 9 | System.out.println("执行人:"+delegateTask.getAssignee()); 10 | //根据任务节点逻辑查询实际需要的执行人是谁 11 | delegateTask.setAssignee("wukong"); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/imooc/activitiweb/listener/PiListener.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb.listener; 2 | 3 | import org.activiti.engine.delegate.DelegateExecution; 4 | import org.activiti.engine.delegate.ExecutionListener; 5 | import org.activiti.engine.delegate.Expression; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | 8 | public class PiListener implements ExecutionListener { 9 | @Autowired 10 | 11 | private Expression sendType; 12 | @Override 13 | public void notify(DelegateExecution execution) { 14 | System.out.println(execution.getEventName()); 15 | System.out.println(execution.getProcessDefinitionId()); 16 | if("start".equals(execution.getEventName())){ 17 | //记录节点开始时间 18 | }else if("end".equals(execution.getEventName())){ 19 | //记录节点结束时间 20 | } 21 | System.out.println("sendType:"+sendType.getValue(execution).toString()); 22 | 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/imooc/activitiweb/listener/ServiceTaskListener1.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb.listener; 2 | 3 | import org.activiti.engine.delegate.DelegateExecution; 4 | import org.activiti.engine.delegate.JavaDelegate; 5 | 6 | public class ServiceTaskListener1 implements JavaDelegate { 7 | 8 | @Override 9 | public void execute(DelegateExecution execution) { 10 | 11 | System.out.println(execution.getEventName()); 12 | System.out.println(execution.getProcessDefinitionId()); 13 | System.out.println(execution.getProcessInstanceId()); 14 | 15 | execution.setVariable("aa","bb"); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/imooc/activitiweb/listener/ServiceTaskListener2.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb.listener; 2 | 3 | import org.activiti.engine.delegate.DelegateExecution; 4 | import org.activiti.engine.delegate.JavaDelegate; 5 | 6 | public class ServiceTaskListener2 implements JavaDelegate { 7 | 8 | @Override 9 | public void execute(DelegateExecution execution) { 10 | 11 | execution.getVariable("aa"); 12 | System.out.println(execution.getVariable("aa")); 13 | 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/imooc/activitiweb/listener/TkListener1.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb.listener; 2 | 3 | import org.activiti.engine.delegate.DelegateTask; 4 | import org.activiti.engine.delegate.TaskListener; 5 | 6 | public class TkListener1 implements TaskListener { 7 | @Override 8 | public void notify(DelegateTask delegateTask) { 9 | System.out.println("执行人:"+delegateTask.getAssignee()); 10 | //根据用户名查询用户电话并调用发送短信接口 11 | delegateTask.setVariable("delegateAssignee",delegateTask.getAssignee()); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/imooc/activitiweb/listener/TkListener2.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb.listener; 2 | 3 | import org.activiti.engine.delegate.DelegateTask; 4 | import org.activiti.engine.delegate.TaskListener; 5 | 6 | public class TkListener2 implements TaskListener { 7 | @Override 8 | public void notify(DelegateTask delegateTask) { 9 | System.out.println("执行人2:"+delegateTask.getVariable("delegateAssignee")); 10 | //根据执行人username获取组织机构代码,加工后得到领导是wukong 11 | delegateTask.setAssignee("wukong"); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/imooc/activitiweb/mapper/ActivitiMapper.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb.mapper; 2 | 3 | 4 | 5 | import com.imooc.activitiweb.pojo.Act_ru_task; 6 | import org.apache.ibatis.annotations.*; 7 | import org.springframework.stereotype.Component; 8 | 9 | import java.util.HashMap; 10 | import java.util.List; 11 | 12 | 13 | @Mapper 14 | @Component 15 | public interface ActivitiMapper { 16 | 17 | //读取表单 18 | @Select("SELECT Control_ID_,Control_VALUE_ from formdata where PROC_INST_ID_ = #{PROC_INST_ID}") 19 | List> selectFormData(@Param("PROC_INST_ID") String PROC_INST_ID); 20 | 21 | 22 | //写入表单 23 | @Insert("") 29 | int insertFormData(@Param("maps") List> maps); 30 | 31 | //删除表单 32 | @Delete("DELETE FROM formdata WHERE PROC_DEF_ID_ = #{PROC_DEF_ID}") 33 | int DeleteFormData(@Param("PROC_DEF_ID") String PROC_DEF_ID); 34 | 35 | //获取用户名 36 | @Select("SELECT name,username from user") 37 | List> selectUser(); 38 | 39 | //测试 40 | @Select("select NAME_,TASK_DEF_KEY_ from act_ru_task") 41 | List selectName(); 42 | 43 | //流程定义数 44 | //SELECT COUNT(ID_) from ACT_RE_PROCDEF 45 | 46 | //进行中的流程实例 47 | //SELECT COUNT(DISTINCT PROC_INST_ID_) from act_ru_execution 48 | 49 | //查询流程定义产生的流程实例数 50 | /* SELECT p.NAME_,COUNT(DISTINCT e.PROC_INST_ID_) as PiNUM from act_ru_execution AS e 51 | RIGHT JOIN ACT_RE_PROCDEF AS p on e.PROC_DEF_ID_ = p.ID_ 52 | WHERE p.NAME_ IS NOT NULL GROUP BY p.NAME_*/ 53 | 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/com/imooc/activitiweb/mapper/UserInfoBeanMapper.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb.mapper; 2 | 3 | 4 | import com.imooc.activitiweb.pojo.UserInfoBean; 5 | import org.apache.ibatis.annotations.Mapper; 6 | import org.apache.ibatis.annotations.Param; 7 | import org.apache.ibatis.annotations.Select; 8 | import org.springframework.stereotype.Component; 9 | 10 | 11 | @Mapper 12 | @Component 13 | public interface UserInfoBeanMapper { 14 | /** 15 | * 从数据库中查询用户 16 | * @param username 17 | * @return 18 | */ 19 | @Select("select * from user where username = #{username}") 20 | UserInfoBean selectByUsername(@Param("username") String username); 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/imooc/activitiweb/pojo/Act_ru_task.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb.pojo; 2 | 3 | public class Act_ru_task { 4 | 5 | private String NAME_; 6 | private String TASK_DEF_KEY_; 7 | 8 | public String getNAME_() { 9 | return NAME_; 10 | } 11 | 12 | public void setNAME_(String NAME_) { 13 | this.NAME_ = NAME_; 14 | } 15 | 16 | 17 | public String getTASK_DEF_KEY_() { 18 | return TASK_DEF_KEY_; 19 | } 20 | 21 | public void setTASK_DEF_KEY_(String TASK_DEF_KEY_) { 22 | this.TASK_DEF_KEY_ = TASK_DEF_KEY_; 23 | } 24 | 25 | @Override 26 | public String toString() { 27 | return "act_ru_task{" + 28 | "NAME_='" + NAME_ + '\'' + 29 | ", TASK_DEF_KEY_='" + TASK_DEF_KEY_ + '\'' + 30 | '}'; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/imooc/activitiweb/pojo/UserInfoBean.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb.pojo; 2 | 3 | import org.springframework.security.core.GrantedAuthority; 4 | import org.springframework.security.core.authority.SimpleGrantedAuthority; 5 | import org.springframework.security.core.userdetails.UserDetails; 6 | import org.springframework.stereotype.Component; 7 | 8 | import java.util.Arrays; 9 | import java.util.Collection; 10 | import java.util.stream.Collectors; 11 | 12 | 13 | @Component 14 | public class UserInfoBean implements UserDetails { 15 | private Long id; 16 | public String name; 17 | private String address; 18 | private String username; 19 | private String password; 20 | private String roles; 21 | 22 | /** 23 | * 从数据库中取出roles字符串后,进行分解,构成一个GrantedAuthority的List返回 24 | * @return 25 | */ 26 | @Override 27 | public Collection getAuthorities() { 28 | return Arrays.stream(roles.split(",")).map(e->new SimpleGrantedAuthority(e)).collect(Collectors.toSet()); 29 | } 30 | 31 | @Override 32 | public String getPassword() { 33 | return password; 34 | } 35 | 36 | @Override 37 | public String getUsername() { 38 | return username; 39 | } 40 | 41 | @Override 42 | public boolean isAccountNonExpired() { 43 | return true; 44 | } 45 | 46 | @Override 47 | public boolean isAccountNonLocked() { 48 | return true; 49 | } 50 | 51 | @Override 52 | public boolean isCredentialsNonExpired() { 53 | return true; 54 | } 55 | 56 | @Override 57 | public boolean isEnabled() { 58 | return true; 59 | } 60 | 61 | 62 | public String getAddress() { 63 | return address; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/com/imooc/activitiweb/security/ActivitiSecurityController.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb.security; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.http.HttpStatus; 6 | import org.springframework.security.web.DefaultRedirectStrategy; 7 | import org.springframework.security.web.RedirectStrategy; 8 | import org.springframework.security.web.savedrequest.HttpSessionRequestCache; 9 | import org.springframework.security.web.savedrequest.RequestCache; 10 | import org.springframework.web.bind.annotation.RequestMapping; 11 | import org.springframework.web.bind.annotation.ResponseStatus; 12 | import org.springframework.web.bind.annotation.RestController; 13 | 14 | import javax.servlet.http.HttpServletRequest; 15 | import javax.servlet.http.HttpServletResponse; 16 | 17 | @RestController 18 | public class ActivitiSecurityController { 19 | private Logger logger = LoggerFactory.getLogger(getClass()); 20 | private RequestCache requestCache = new HttpSessionRequestCache(); 21 | private RedirectStrategy redirectStrategy = new DefaultRedirectStrategy(); 22 | 23 | //估计是在springSecurity登录验证之后,对未登录用户跳转行为进行的判断。 24 | @RequestMapping("/login") 25 | @ResponseStatus(code = HttpStatus.UNAUTHORIZED) 26 | public SimpleResponse requireAuthentication(HttpServletRequest request, HttpServletResponse response) { 27 | /*SavedRequest savedRequest = requestCache.getRequest(request,response); 28 | if(savedRequest != null){ 29 | String targetUrl = savedRequest.getRedirectUrl(); 30 | logger.info("引发跳转的请求是:"+targetUrl); 31 | if(StringUtils.endsWithIgnoreCase(targetUrl,".html")){ 32 | try { 33 | redirectStrategy.sendRedirect(request, response, "/demo-login.html"); 34 | } 35 | catch(Exception e) 36 | { 37 | 38 | } 39 | } 40 | }*/ 41 | 42 | return new SimpleResponse("需要登录,使用/demo-login.html或发起post求情"); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/imooc/activitiweb/security/LoginFailureHandler.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb.security; 2 | 3 | import com.fasterxml.jackson.databind.ObjectMapper; 4 | import com.imooc.activitiweb.util.AjaxResponse; 5 | import com.imooc.activitiweb.util.GlobalConfig; 6 | import org.slf4j.Logger; 7 | import org.slf4j.LoggerFactory; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.http.HttpStatus; 10 | import org.springframework.security.core.AuthenticationException; 11 | import org.springframework.security.web.authentication.AuthenticationFailureHandler; 12 | import org.springframework.stereotype.Component; 13 | 14 | import javax.servlet.ServletException; 15 | import javax.servlet.http.HttpServletRequest; 16 | import javax.servlet.http.HttpServletResponse; 17 | import java.io.IOException; 18 | 19 | @Component("loginFailureHandler") 20 | public class LoginFailureHandler implements AuthenticationFailureHandler{ 21 | private Logger logger = LoggerFactory.getLogger(getClass()); 22 | 23 | @Autowired 24 | private ObjectMapper objectMapper; 25 | 26 | @Override 27 | public void onAuthenticationFailure(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, AuthenticationException e) throws IOException, ServletException { 28 | logger.info("登录失败"); 29 | httpServletResponse.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value()); 30 | httpServletResponse.setContentType("application/json;charset=UTF-8"); 31 | 32 | 33 | 34 | httpServletResponse.getWriter().write(objectMapper.writeValueAsString( 35 | AjaxResponse.AjaxData(GlobalConfig.ResponseCode.ERROR.getCode(), 36 | GlobalConfig.ResponseCode.ERROR.getDesc(), 37 | "登录失败:"+e.getMessage() 38 | ))); 39 | } 40 | } 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/main/java/com/imooc/activitiweb/security/LoginSuccessHandler.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb.security; 2 | 3 | import com.fasterxml.jackson.databind.ObjectMapper; 4 | import com.imooc.activitiweb.util.AjaxResponse; 5 | import com.imooc.activitiweb.util.GlobalConfig; 6 | import org.slf4j.Logger; 7 | import org.slf4j.LoggerFactory; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.security.core.Authentication; 10 | import org.springframework.security.web.authentication.AuthenticationSuccessHandler; 11 | import org.springframework.stereotype.Component; 12 | 13 | import javax.servlet.FilterChain; 14 | import javax.servlet.ServletException; 15 | import javax.servlet.http.HttpServletRequest; 16 | import javax.servlet.http.HttpServletResponse; 17 | import java.io.IOException; 18 | 19 | @Component("loginSuccessHandler") 20 | public class LoginSuccessHandler implements AuthenticationSuccessHandler { 21 | private Logger logger = LoggerFactory.getLogger(getClass()); 22 | 23 | @Autowired 24 | private ObjectMapper objectMapper; 25 | @Override 26 | public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, FilterChain chain, Authentication authentication) throws IOException, ServletException { 27 | logger.info("登录成功1"); 28 | 29 | } 30 | 31 | @Override 32 | public void onAuthenticationSuccess(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Authentication authentication) throws IOException, ServletException { 33 | logger.info("登录成功2"); 34 | httpServletResponse.setContentType("application/json;charset=UTF-8"); 35 | httpServletResponse.getWriter().write(objectMapper.writeValueAsString( 36 | AjaxResponse.AjaxData(GlobalConfig.ResponseCode.SUCCESS.getCode(), 37 | GlobalConfig.ResponseCode.SUCCESS.getDesc(), 38 | authentication.getName() 39 | ))); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/imooc/activitiweb/security/SimpleResponse.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb.security; 2 | 3 | public class SimpleResponse { 4 | 5 | 6 | public Object getContent() { 7 | return content; 8 | } 9 | 10 | public void setContent(Object content) { 11 | this.content = content; 12 | } 13 | 14 | public SimpleResponse(Object content) { 15 | this.content = content; 16 | } 17 | 18 | private Object content; 19 | 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/imooc/activitiweb/security/SwaggerConfig.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb.security; 2 | 3 | import com.google.common.base.Predicates; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | import springfox.documentation.builders.PathSelectors; 7 | import springfox.documentation.builders.RequestHandlerSelectors; 8 | import springfox.documentation.spi.DocumentationType; 9 | import springfox.documentation.spring.web.plugins.Docket; 10 | import springfox.documentation.swagger2.annotations.EnableSwagger2; 11 | 12 | 13 | @Configuration 14 | @EnableSwagger2 15 | public class SwaggerConfig { 16 | 17 | @Bean 18 | public Docket api() { 19 | return new Docket(DocumentationType.SWAGGER_2) 20 | .select() 21 | .apis(Predicates.or(RequestHandlerSelectors.basePackage("com.imooc.activitiweb"))) 22 | .paths(PathSelectors.any()) 23 | .build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/imooc/activitiweb/util/AjaxResponse.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb.util; 2 | 3 | 4 | public class AjaxResponse { 5 | private Integer status; 6 | private String msg; 7 | private Object obj; 8 | 9 | public Integer getStatus() { 10 | return status; 11 | } 12 | 13 | public void setStatus(Integer status) { 14 | this.status = status; 15 | } 16 | 17 | public String getMsg() { 18 | return msg; 19 | } 20 | 21 | public void setMsg(String msg) { 22 | this.msg = msg; 23 | } 24 | 25 | public Object getObj() { 26 | return obj; 27 | } 28 | 29 | public void setObj(Object obj) { 30 | this.obj = obj; 31 | } 32 | 33 | private AjaxResponse(Integer status, String msg, Object obj) { 34 | this.status = status; 35 | this.msg = msg; 36 | this.obj = obj; 37 | } 38 | 39 | public static AjaxResponse AjaxData(Integer status, String msg, Object obj) { 40 | return new AjaxResponse(status, msg, obj); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/imooc/activitiweb/util/GlobalConfig.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb.util; 2 | 3 | public class GlobalConfig { 4 | /** 5 | * 测试场景 6 | */ 7 | public static final Boolean Test = false; 8 | 9 | //windows路径 10 | public static final String BPMN_PathMapping = "file:D:\\WangJianIDEA_Test\\activiti-imooc\\src\\main\\resources\\resources\\bpmn\\"; 11 | 12 | //Liunx路径 13 | //public static final String BPMN_PathMapping = "file:/root/Activiti/"; 14 | 15 | public enum ResponseCode { 16 | SUCCESS(0, "成功"), 17 | ERROR(1, "错误"); 18 | 19 | private final int code; 20 | private final String desc; 21 | 22 | ResponseCode(int code, String desc) { 23 | this.code = code; 24 | this.desc = desc; 25 | } 26 | 27 | public int getCode() { 28 | return code; 29 | } 30 | 31 | public String getDesc() { 32 | return desc; 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/imooc/activitiweb/util/PathMapping.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb.util; 2 | 3 | 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; 6 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 7 | 8 | 9 | @Configuration 10 | public class PathMapping implements WebMvcConfigurer { 11 | @Override 12 | public void addResourceHandlers(ResourceHandlerRegistry registry) { 13 | //String[] resourceLocation = new String[]{"file:D:\\WangJianIDEA_Test\\activiti-imooc\\src\\main\\resources\\resources\\bpmn\\","classpath:/resources/"}; 14 | registry.addResourceHandler("/**").addResourceLocations("classpath:/resources/");//默认也有这个路径映射 15 | registry.addResourceHandler("/bpmn/**").addResourceLocations(GlobalConfig.BPMN_PathMapping); 16 | 17 | registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/"); 18 | registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/"); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: / 5 | session: 6 | timeout: 9000 7 | spring: 8 | datasource: 9 | username: root 10 | password: 666666 11 | url: jdbc:mysql://192.168.1.196:3306/activiti?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=UTC&nullCatalogMeansCurrent=true 12 | driver-class-name: com.mysql.cj.jdbc.Driver 13 | #日志的相关配置 14 | logging: 15 | level: 16 | root: info 17 | #日志的相关配置 18 | spring.activiti.history-level: full 19 | spring.activiti.db-history-used: true 20 | # spring-activiti 21 | # 自动部署验证设置:true-开启(默认)、false-关闭 22 | spring.activiti.check-process-definitions: false -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | tmp/ 3 | dist/ -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/bpmnjs/app/favicon.ico -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/dist/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/bpmnjs/dist/favicon.ico -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/dist/vendor/bpmn-font/font/bpmn.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/bpmnjs/dist/vendor/bpmn-font/font/bpmn.eot -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/dist/vendor/bpmn-font/font/bpmn.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/bpmnjs/dist/vendor/bpmn-font/font/bpmn.ttf -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/dist/vendor/bpmn-font/font/bpmn.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/bpmnjs/dist/vendor/bpmn-font/font/bpmn.woff -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/dist/vendor/bpmn-font/font/bpmn.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/bpmnjs/dist/vendor/bpmn-font/font/bpmn.woff2 -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bpmn-js-example-properties-panel", 3 | "version": "0.0.0", 4 | "description": "A bpmn-js modeler + properties panel example", 5 | "main": "app/index.js", 6 | "scripts": { 7 | "all": "grunt", 8 | "dev": "grunt auto-build" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "https://github.com/bpmn-io/bpmn-js-examples" 13 | }, 14 | "keywords": [ 15 | "bpmnjs-example" 16 | ], 17 | "author": { 18 | "name": "Nico Rehwaldt", 19 | "url": "https://github.com/nikku" 20 | }, 21 | "contributors": [ 22 | { 23 | "name": "bpmn.io contributors", 24 | "url": "https://github.com/bpmn-io" 25 | } 26 | ], 27 | "license": "MIT", 28 | "devDependencies": { 29 | "esmify": "^2.1.1", 30 | "grunt": "^1.0.4", 31 | "grunt-browserify": "^5.3.0", 32 | "grunt-contrib-connect": "^2.0.0", 33 | "grunt-contrib-copy": "^1.0.0", 34 | "grunt-contrib-less": "^2.0.0", 35 | "grunt-contrib-watch": "^1.1.0", 36 | "load-grunt-tasks": "^5.0.0", 37 | "stringify": "^5.2.0" 38 | }, 39 | "dependencies": { 40 | "bpmn-js": "^7.0.0", 41 | "bpmn-js-properties-panel": "^0.32.0", 42 | "camunda-bpmn-moddle": "^4.0.1", 43 | "diagram-js": "^5.0.0", 44 | "jquery": "^3.4.1", 45 | "min-dash": "^3.5.0", 46 | "x2js": "^3.4.0" 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/customControls/CustomContextPad.js: -------------------------------------------------------------------------------- 1 | export default class CustomContextPad { 2 | constructor(config, contextPad, create, elementFactory, injector, translate) { 3 | this.create = create; 4 | this.elementFactory = elementFactory; 5 | this.translate = translate; 6 | //自动摆放位置 7 | if (config.autoPlace !== false) { 8 | this.autoPlace = injector.get('autoPlace', false); 9 | } 10 | //注册工具 11 | contextPad.registerProvider(this); 12 | } 13 | getContextPadEntries(element) { 14 | const { 15 | autoPlace, 16 | create, 17 | elementFactory, 18 | translate 19 | } = this; 20 | 21 | function appendUserTask(event, element) { 22 | if (autoPlace) { 23 | const shape = elementFactory.createShape({ type: 'bpmn:UserTask' }); 24 | autoPlace.append(element, shape); 25 | } else { 26 | appendUserTaskStart(event, element); 27 | } 28 | } 29 | 30 | function appendUserTaskStart(event) { 31 | const shape = elementFactory.createShape({ type: 'bpmn:UserTask' }); 32 | create.start(event, shape, element); 33 | } 34 | function appendCallActivityStart(event) { 35 | const shape = elementFactory.createShape({ type: 'bpmn:CallActivity' }); 36 | create.start(event, shape, element); 37 | } 38 | 39 | function appendCallActivity(event, element) { 40 | if (autoPlace) { 41 | const shape = elementFactory.createShape({ type: 'bpmn:CallActivity' }); 42 | autoPlace.append(element, shape); 43 | } else { 44 | appendCallActivityStart(event, element); 45 | } 46 | } 47 | return { 48 | 'append.user-task': { 49 | group: 'model', 50 | className: 'bpmn-icon-user-task', 51 | title: translate('Append ServiceTask'), 52 | action: { 53 | click: appendUserTask, 54 | dragstart: appendUserTaskStart 55 | } 56 | }, 57 | 'append.call-activity':{ 58 | group: 'model', 59 | className: 'bpmn-icon-call-activity', 60 | title: translate('Append CallActivity'), 61 | action: { 62 | click: appendCallActivity, 63 | dragstart: appendCallActivityStart 64 | } 65 | } 66 | }; 67 | } 68 | } 69 | CustomContextPad.$inject = [ 70 | 'config', 71 | 'contextPad', 72 | 'create', 73 | 'elementFactory', 74 | 'injector', 75 | 'translate' 76 | ]; -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/customControls/CustomPalette.js: -------------------------------------------------------------------------------- 1 | export default class CustomPalette { 2 | constructor(create, elementFactory, palette, translate) { 3 | this.create = create; 4 | this.elementFactory = elementFactory; 5 | this.translate = translate; 6 | palette.registerProvider(this); 7 | } 8 | 9 | getPaletteEntries(element) { 10 | const { 11 | create, 12 | elementFactory, 13 | translate 14 | } = this; 15 | 16 | function createServiceTask(event) { 17 | const shape = elementFactory.createShape({ type: 'bpmn:UserTask' }); 18 | create.start(event, shape); 19 | } 20 | function createCallActivity(event) { 21 | const shape = elementFactory.createShape({ type: 'bpmn:CallActivity' }); 22 | create.start(event, shape); 23 | } 24 | 25 | 26 | return { 27 | 'create.user-task': { 28 | group: 'activity', 29 | className: 'bpmn-icon-user-task', 30 | title: translate('Create UserTask'), 31 | action: { 32 | dragstart: createServiceTask, 33 | click: createServiceTask 34 | } 35 | }, 36 | 'create.call-activity': { 37 | group: 'activity', 38 | className: 'bpmn-icon-call-activity', 39 | title: translate('Create CallActivity'), 40 | action: { 41 | dragstart: createCallActivity, 42 | click: createCallActivity 43 | } 44 | } 45 | } 46 | } 47 | } 48 | 49 | CustomPalette.$inject = [ 50 | 'create', 51 | 'elementFactory', 52 | 'palette', 53 | 'translate' 54 | ]; -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/customControls/index.js: -------------------------------------------------------------------------------- 1 | import CustomContextPad from './CustomContextPad'; 2 | import CustomPalette from './CustomPalette'; 3 | 4 | export default { 5 | __init__: [ 'customContextPad', 'customPalette' ], 6 | customContextPad: [ 'type', CustomContextPad ], 7 | customPalette: [ 'type', CustomPalette ] 8 | }; -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/customTranslate/customTranslate.js: -------------------------------------------------------------------------------- 1 | import translations from './translationsGerman'; 2 | export default function customTranslate(template, replacements) { 3 | replacements = replacements || {}; 4 | template = translations[template] || template; 5 | return template.replace(/{([^}]+)}/g, function(_, key) { 6 | var str = replacements[key]; 7 | if(translations[replacements[key]] != null && translations [replacements[key]] != 'undefined'){ 8 | str = translations[replacements[key]]; 9 | } 10 | return str || '{' + key + '}'; 11 | }); 12 | } -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/newDiagram.bpmn: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/PropertiesActivator.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var DEFAULT_PRIORITY = 1000; 4 | 5 | 6 | /** 7 | * A component that decides upon the visibility / editable 8 | * state of properties in the properties panel. 9 | * 10 | * Implementors must subclass this component and override 11 | * {@link PropertiesActivator#isEntryVisible} and 12 | * {@link PropertiesActivator#isPropertyEditable} to provide 13 | * custom behavior. 14 | * 15 | * @class 16 | * @constructor 17 | * 18 | * @param {EventBus} eventBus 19 | * @param {Number} [priority] at which priority to hook into the activation 20 | */ 21 | function PropertiesActivator(eventBus, priority) { 22 | var self = this; 23 | 24 | priority = priority || DEFAULT_PRIORITY; 25 | 26 | eventBus.on('propertiesPanel.isEntryVisible', priority, function(e) { 27 | return self.isEntryVisible(e.entry, e.element); 28 | }); 29 | 30 | eventBus.on('propertiesPanel.isPropertyEditable', priority, function(e) { 31 | return self.isPropertyEditable(e.entry, e.propertyName, e.element); 32 | }); 33 | } 34 | 35 | PropertiesActivator.$inject = [ 'eventBus' ]; 36 | 37 | module.exports = PropertiesActivator; 38 | 39 | 40 | /** 41 | * Should the given entry be visible for the specified element. 42 | * 43 | * @method PropertiesActivator#isEntryVisible 44 | * 45 | * @param {EntryDescriptor} entry 46 | * @param {ModdleElement} element 47 | * 48 | * @returns {Boolean} 49 | */ 50 | PropertiesActivator.prototype.isEntryVisible = function(entry, element) { 51 | return true; 52 | }; 53 | 54 | /** 55 | * Should the given property be editable for the specified element 56 | * 57 | * @method PropertiesActivator#isPropertyEditable 58 | * 59 | * @param {EntryDescriptor} entry 60 | * @param {String} propertyName 61 | * @param {ModdleElement} element 62 | * 63 | * @returns {Boolean} 64 | */ 65 | PropertiesActivator.prototype.isPropertyEditable = function(entry, propertyName, element) { 66 | return true; 67 | }; -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/cmd/MultiCommandHandler.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var forEach = require('lodash/forEach'); 4 | 5 | /** 6 | * A handler that combines and executes multiple commands. 7 | * 8 | * All updates are bundled on the command stack and executed in one step. 9 | * This also makes it possible to revert the changes in one step. 10 | * 11 | * Example use case: remove the camunda:formKey attribute and in addition 12 | * add all form fields needed for the camunda:formData property. 13 | * 14 | * @class 15 | * @constructor 16 | */ 17 | function MultiCommandHandler(commandStack) { 18 | this._commandStack = commandStack; 19 | } 20 | 21 | MultiCommandHandler.$inject = [ 'commandStack' ]; 22 | 23 | module.exports = MultiCommandHandler; 24 | 25 | MultiCommandHandler.prototype.preExecute = function(context) { 26 | 27 | var commandStack = this._commandStack; 28 | 29 | forEach(context, function(command) { 30 | commandStack.execute(command.cmd, command.context); 31 | }); 32 | }; -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/cmd/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var forEach = require('lodash/forEach'); 4 | 5 | var HANDLERS = { 6 | 'properties-panel.update-businessobject': require('./UpdateBusinessObjectHandler'), 7 | 'properties-panel.create-and-reference': require('./CreateAndReferenceHandler'), 8 | 'properties-panel.create-businessobject-list': require('./CreateBusinessObjectListHandler'), 9 | 'properties-panel.update-businessobject-list': require('./UpdateBusinessObjectListHandler'), 10 | 'properties-panel.multi-command-executor': require('./MultiCommandHandler') 11 | }; 12 | 13 | 14 | function CommandInitializer(eventBus, commandStack) { 15 | 16 | eventBus.on('diagram.init', function() { 17 | forEach(HANDLERS, function(handler, id) { 18 | commandStack.registerHandler(id, handler); 19 | }); 20 | }); 21 | } 22 | 23 | CommandInitializer.$inject = [ 'eventBus', 'commandStack' ]; 24 | 25 | module.exports = { 26 | __init__: [ CommandInitializer ] 27 | }; -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/factory/EntryFieldDescription.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var escapeHTML = require('../Utils').escapeHTML; 4 | 5 | /** 6 | * Create a linkified and HTML escaped entry field description. 7 | * 8 | * As a special feature, this description may contain both markdown 9 | * and plain links. 10 | * 11 | * @param {String} description 12 | */ 13 | module.exports = function entryFieldDescription(description) { 14 | 15 | // we tokenize the description to extract text, HTML and markdown links 16 | // text and links are handled seperately 17 | 18 | var escaped = []; 19 | 20 | // match markdown [{TEXT}]({URL}) and HTML links {TEXT} 21 | var pattern = /(?:\[([^\]]+)\]\((https?:\/\/[^"<>\]]+)\))|(?:]+)">([^<]*)<\/a>)/gi; 22 | 23 | var index = 0; 24 | var match; 25 | var link, text; 26 | 27 | while ((match = pattern.exec(description))) { 28 | 29 | // escape + insert text before match 30 | if (match.index > index) { 31 | escaped.push(escapeHTML(description.substring(index, match.index))); 32 | } 33 | 34 | link = match[2] || match[3]; 35 | text = match[1] || match[4]; 36 | 37 | // insert safe link 38 | escaped.push('' + escapeHTML(text) + ''); 39 | 40 | index = match.index + match[0].length; 41 | } 42 | 43 | // escape and insert text after last match 44 | if (index < description.length) { 45 | escaped.push(escapeHTML(description.substring(index))); 46 | } 47 | 48 | return '
' + escaped.join('') + '
'; 49 | }; -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/factory/LabelFactory.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * The label factory provides a label entry. For the label text 5 | * it expects either a string provided by the options.labelText 6 | * parameter or it could be generated programmatically using a 7 | * function passed as the options.get parameter. 8 | * 9 | * @param {Object} options 10 | * @param {string} options.id 11 | * @param {string} [options.labelText] 12 | * @param {Function} [options.get] 13 | * @param {Function} [options.showLabel] 14 | * @param {Boolean} [options.divider] adds a divider at the top of the label if true; default: false 15 | */ 16 | var label = function(options) { 17 | return { 18 | id: options.id, 19 | html: '', 23 | get: function(element, node) { 24 | if (typeof options.get === 'function') { 25 | return options.get(element, node); 26 | } 27 | return { label: options.labelText }; 28 | }, 29 | showLabel: function(element, node) { 30 | if (typeof options.showLabel === 'function') { 31 | return options.showLabel(element, node); 32 | } 33 | return true; 34 | } 35 | }; 36 | }; 37 | 38 | module.exports = label; 39 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/factory/LinkEntryFactory.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var escapeHTML = require('../Utils').escapeHTML; 4 | 5 | var entryFieldDescription = require('./EntryFieldDescription'); 6 | 7 | var bind = require('lodash/bind'); 8 | 9 | /** 10 | * An entry that renders a clickable link. 11 | * 12 | * A passed {@link options#handleClick} handler is responsible 13 | * to process the click. 14 | * 15 | * The link may be conditionally shown or hidden. This can be 16 | * controlled via the {@link options.showLink}. 17 | * 18 | * @param {Object} options 19 | * @param {String} options.id 20 | * @param {String} [options.label] 21 | * @param {Function} options.handleClick 22 | * @param {Function} [options.showLink] returning false to hide link 23 | * @param {String} [options.description] 24 | * 25 | * @example 26 | * 27 | * var linkEntry = link({ 28 | * id: 'foo', 29 | * description: 'Some Description', 30 | * handleClick: function(element, node, event) { ... }, 31 | * showLink: function(element, node) { ... } 32 | * }); 33 | * 34 | * @return {Entry} the newly created entry 35 | */ 36 | function link(options) { 37 | 38 | var id = options.id, 39 | label = options.label || id, 40 | showLink = options.showLink, 41 | handleClick = options.handleClick, 42 | description = options.description; 43 | 44 | if (showLink && typeof showLink !== 'function') { 45 | throw new Error('options.showLink must be a function'); 46 | } 47 | 48 | if (typeof handleClick !== 'function') { 49 | throw new Error('options.handleClick must be a function'); 50 | } 51 | 52 | var resource = { 53 | id: id 54 | }; 55 | 56 | resource.html = 57 | '' + escapeHTML(label) + ''; 61 | 62 | // add description below link entry field 63 | if (description) { 64 | resource.html += entryFieldDescription(description); 65 | } 66 | 67 | resource.handleClick = bind(handleClick, resource); 68 | 69 | if (typeof showLink === 'function') { 70 | resource.showLink = function() { 71 | return showLink.apply(resource, arguments); 72 | }; 73 | } 74 | 75 | return resource; 76 | } 77 | 78 | module.exports = link; 79 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/factory/TextBoxEntryFactory.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var escapeHTML = require('../Utils').escapeHTML; 4 | 5 | var entryFieldDescription = require('./EntryFieldDescription'); 6 | 7 | 8 | var textBox = function(options, defaultParameters) { 9 | 10 | var resource = defaultParameters, 11 | label = options.label || resource.id, 12 | canBeShown = !!options.show && typeof options.show === 'function', 13 | description = options.description; 14 | 15 | resource.html = 16 | '' + 19 | '
' + 22 | '
' + 24 | '
'; 25 | 26 | // add description below text box entry field 27 | if (description) { 28 | resource.html += entryFieldDescription(description); 29 | } 30 | 31 | if (canBeShown) { 32 | resource.isShown = function() { 33 | return options.show.apply(resource, arguments); 34 | }; 35 | } 36 | 37 | resource.cssClasses = ['bpp-textbox']; 38 | 39 | return resource; 40 | }; 41 | 42 | module.exports = textBox; 43 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/factory/ValidationAwareTextInput.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var textField = require('./TextInputEntryFactory'); 4 | 5 | /** 6 | * This function is a wrapper around TextInputEntryFactory. 7 | * It adds functionality to cache an invalid value entered in the 8 | * text input, instead of setting it on the business object. 9 | */ 10 | var validationAwareTextField = function(options, defaultParameters) { 11 | 12 | var modelProperty = options.modelProperty; 13 | 14 | defaultParameters.get = function(element, node) { 15 | var value = this.__lastInvalidValue; 16 | 17 | delete this.__lastInvalidValue; 18 | 19 | var properties = {}; 20 | 21 | properties[modelProperty] = value !== undefined ? value : options.getProperty(element, node); 22 | 23 | return properties; 24 | }; 25 | 26 | defaultParameters.set = function(element, values, node) { 27 | var validationErrors = validate.apply(this, [ element, values, node ]), 28 | propertyValue = values[modelProperty]; 29 | 30 | // make sure we do not update the id 31 | if (validationErrors && validationErrors[modelProperty]) { 32 | this.__lastInvalidValue = propertyValue; 33 | 34 | return options.setProperty(element, {}, node); 35 | } else { 36 | var properties = {}; 37 | 38 | properties[modelProperty] = propertyValue; 39 | 40 | return options.setProperty(element, properties, node); 41 | } 42 | }; 43 | 44 | var validate = defaultParameters.validate = function(element, values, node) { 45 | var value = values[modelProperty] || this.__lastInvalidValue; 46 | 47 | var property = {}; 48 | property[modelProperty] = value; 49 | 50 | return options.validate(element, property, node); 51 | }; 52 | 53 | return textField(options, defaultParameters); 54 | }; 55 | 56 | module.exports = validationAwareTextField; 57 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/helper/AsyncCapableHelper.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var map = require('lodash/map'); 4 | 5 | var extensionElementsHelper = require('./ExtensionElementsHelper'); 6 | 7 | /** 8 | * Returns true if the attribute 'activiti:asyncBefore' is set 9 | * to true. 10 | * 11 | * @param {ModdleElement} bo 12 | * 13 | * @return {boolean} a boolean value 14 | */ 15 | function isAsyncBefore(bo) { 16 | return !!(bo.get('activiti:asyncBefore') || bo.get('activiti:async')); 17 | } 18 | 19 | module.exports.isAsyncBefore = isAsyncBefore; 20 | 21 | /** 22 | * Returns true if the attribute 'activiti:asyncAfter' is set 23 | * to true. 24 | * 25 | * @param {ModdleElement} bo 26 | * 27 | * @return {boolean} a boolean value 28 | */ 29 | function isAsyncAfter(bo) { 30 | return !!bo.get('activiti:asyncAfter'); 31 | } 32 | 33 | module.exports.isAsyncAfter = isAsyncAfter; 34 | 35 | /** 36 | * Returns true if the attribute 'activiti:exclusive' is set 37 | * to true. 38 | * 39 | * @param {ModdleElement} bo 40 | * 41 | * @return {boolean} a boolean value 42 | */ 43 | function isExclusive(bo) { 44 | return !!bo.get('activiti:exclusive'); 45 | } 46 | 47 | module.exports.isExclusive = isExclusive; 48 | 49 | /** 50 | * Get first 'activiti:FailedJobRetryTimeCycle' from the business object. 51 | * 52 | * @param {ModdleElement} bo 53 | * 54 | * @return {Array} a list of 'activiti:FailedJobRetryTimeCycle' 55 | */ 56 | function getFailedJobRetryTimeCycle(bo) { 57 | return (extensionElementsHelper.getExtensionElements(bo, 'activiti:FailedJobRetryTimeCycle') || [])[0]; 58 | } 59 | 60 | module.exports.getFailedJobRetryTimeCycle = getFailedJobRetryTimeCycle; 61 | 62 | /** 63 | * Removes all existing 'activiti:FailedJobRetryTimeCycle' from the business object 64 | * 65 | * @param {ModdleElement} bo 66 | * 67 | * @return {Array} a list of 'activiti:FailedJobRetryTimeCycle' 68 | */ 69 | function removeFailedJobRetryTimeCycle(bo, element) { 70 | var retryTimeCycles = extensionElementsHelper.getExtensionElements(bo, 'activiti:FailedJobRetryTimeCycle'); 71 | return map(retryTimeCycles, function(cycle) { 72 | return extensionElementsHelper.removeEntry(bo, element, cycle); 73 | }); 74 | } 75 | 76 | module.exports.removeFailedJobRetryTimeCycle = removeFailedJobRetryTimeCycle; -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/helper/CategoryHelper.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var collectionAdd = require('diagram-js/lib/util/Collections').add, 4 | getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject; 5 | 6 | var CategoryHelper = {}; 7 | 8 | module.exports = CategoryHelper; 9 | 10 | /** 11 | * Creates a new bpmn:CategoryValue inside a new bpmn:Category 12 | * 13 | * @param {ModdleElement} definitions 14 | * @param {BpmnFactory} bpmnFactory 15 | * 16 | * @return {ModdleElement} categoryValue. 17 | */ 18 | CategoryHelper.createCategoryValue = function(definitions, bpmnFactory) { 19 | var categoryValue = bpmnFactory.create('bpmn:CategoryValue'), 20 | category = bpmnFactory.create('bpmn:Category', { 21 | categoryValue: [ categoryValue ] 22 | }); 23 | 24 | // add to correct place 25 | collectionAdd(definitions.get('rootElements'), category); 26 | getBusinessObject(category).$parent = definitions; 27 | getBusinessObject(categoryValue).$parent = category; 28 | 29 | return categoryValue; 30 | 31 | }; -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/helper/CmdHelper.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var CmdHelper = {}; 4 | module.exports = CmdHelper; 5 | 6 | CmdHelper.updateProperties = function(element, properties) { 7 | return { 8 | cmd: 'element.updateProperties', 9 | context: { element: element, properties: properties } 10 | }; 11 | }; 12 | 13 | CmdHelper.updateBusinessObject = function(element, businessObject, newProperties) { 14 | return { 15 | cmd: 'properties-panel.update-businessobject', 16 | context: { 17 | element: element, 18 | businessObject: businessObject, 19 | properties: newProperties 20 | } 21 | }; 22 | }; 23 | 24 | CmdHelper.addElementsTolist = function(element, businessObject, listPropertyName, objectsToAdd) { 25 | return { 26 | cmd: 'properties-panel.update-businessobject-list', 27 | context: { 28 | element: element, 29 | currentObject: businessObject, 30 | propertyName: listPropertyName, 31 | objectsToAdd: objectsToAdd 32 | } 33 | }; 34 | }; 35 | 36 | CmdHelper.removeElementsFromList = function(element, businessObject, listPropertyName, referencePropertyName, objectsToRemove) { 37 | 38 | return { 39 | cmd: 'properties-panel.update-businessobject-list', 40 | context: { 41 | element: element, 42 | currentObject: businessObject, 43 | propertyName: listPropertyName, 44 | referencePropertyName: referencePropertyName, 45 | objectsToRemove: objectsToRemove 46 | } 47 | }; 48 | }; 49 | 50 | 51 | CmdHelper.addAndRemoveElementsFromList = function(element, businessObject, listPropertyName, referencePropertyName, objectsToAdd, objectsToRemove) { 52 | 53 | return { 54 | cmd: 'properties-panel.update-businessobject-list', 55 | context: { 56 | element: element, 57 | currentObject: businessObject, 58 | propertyName: listPropertyName, 59 | referencePropertyName: referencePropertyName, 60 | objectsToAdd: objectsToAdd, 61 | objectsToRemove: objectsToRemove 62 | } 63 | }; 64 | }; 65 | 66 | 67 | CmdHelper.setList = function(element, businessObject, listPropertyName, updatedObjectList) { 68 | return { 69 | cmd: 'properties-panel.update-businessobject-list', 70 | context: { 71 | element: element, 72 | currentObject: businessObject, 73 | propertyName: listPropertyName, 74 | updatedObjectList: updatedObjectList 75 | } 76 | }; 77 | }; 78 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/helper/ElementHelper.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var ElementHelper = {}; 4 | module.exports = ElementHelper; 5 | 6 | /** 7 | * Creates a new element and set the parent to it 8 | * 9 | * @method ElementHelper#createElement 10 | * 11 | * @param {String} elementType of the new element 12 | * @param {Object} properties of the new element in key-value pairs 13 | * @param {moddle.object} parent of the new element 14 | * @param {BpmnFactory} factory which creates the new element 15 | * 16 | * @returns {djs.model.Base} element which is created 17 | */ 18 | ElementHelper.createElement = function(elementType, properties, parent, factory) { 19 | var element = factory.create(elementType, properties); 20 | element.$parent = parent; 21 | 22 | return element; 23 | }; 24 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/helper/EventDefinitionHelper.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject, 4 | is = require('bpmn-js/lib/util/ModelUtil').is, 5 | forEach = require('lodash/forEach'); 6 | 7 | var EventDefinitionHelper = {}; 8 | 9 | module.exports = EventDefinitionHelper; 10 | 11 | EventDefinitionHelper.getEventDefinition = function(element, eventType) { 12 | 13 | var bo = getBusinessObject(element), 14 | eventDefinition = null; 15 | 16 | if (bo.eventDefinitions) { 17 | forEach(bo.eventDefinitions, function(event) { 18 | if (is(event, eventType)) { 19 | eventDefinition = event; 20 | } 21 | }); 22 | } 23 | 24 | return eventDefinition; 25 | }; 26 | 27 | EventDefinitionHelper.getTimerEventDefinition = function(element) { 28 | return this.getEventDefinition(element, 'bpmn:TimerEventDefinition'); 29 | }; 30 | 31 | EventDefinitionHelper.getMessageEventDefinition = function(element) { 32 | return this.getEventDefinition(element, 'bpmn:MessageEventDefinition'); 33 | }; 34 | 35 | EventDefinitionHelper.getSignalEventDefinition = function(element) { 36 | return this.getEventDefinition(element, 'bpmn:SignalEventDefinition'); 37 | }; 38 | 39 | EventDefinitionHelper.getErrorEventDefinition = function(element) { 40 | return this.getEventDefinition(element, 'bpmn:ErrorEventDefinition'); 41 | }; 42 | 43 | EventDefinitionHelper.getEscalationEventDefinition = function(element) { 44 | return this.getEventDefinition(element, 'bpmn:EscalationEventDefinition'); 45 | }; 46 | 47 | EventDefinitionHelper.getCompensateEventDefinition = function(element) { 48 | return this.getEventDefinition(element, 'bpmn:CompensateEventDefinition'); 49 | }; 50 | 51 | EventDefinitionHelper.getLinkEventDefinition = function(element) { 52 | return this.getEventDefinition(element, 'bpmn:LinkEventDefinition'); 53 | }; 54 | 55 | EventDefinitionHelper.getConditionalEventDefinition = function(element) { 56 | return this.getEventDefinition(element, 'bpmn:ConditionalEventDefinition'); 57 | }; 58 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/helper/ExtensionElementsHelper.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var cmdHelper = require('./CmdHelper'), 4 | elementHelper = require('./ElementHelper'); 5 | 6 | var is = require('bpmn-js/lib/util/ModelUtil').is; 7 | 8 | var ExtensionElementsHelper = {}; 9 | 10 | var getExtensionElements = function(bo) { 11 | return bo.get('extensionElements'); 12 | }; 13 | 14 | ExtensionElementsHelper.getExtensionElements = function(bo, type) { 15 | var extensionElements = getExtensionElements(bo); 16 | if (typeof extensionElements !== 'undefined') { 17 | var extensionValues = extensionElements.get('values'); 18 | if (typeof extensionValues !== 'undefined') { 19 | var elements = extensionValues.filter(function(value) { 20 | return is(value, type); 21 | }); 22 | if (elements.length) { 23 | return elements; 24 | } 25 | } 26 | } 27 | }; 28 | 29 | ExtensionElementsHelper.addEntry = function(bo, element, entry, bpmnFactory) { 30 | var extensionElements = bo.get('extensionElements'); 31 | 32 | // if there is no extensionElements list, create one 33 | if (!extensionElements) { 34 | // TODO: Ask Daniel which operation costs more 35 | extensionElements = elementHelper.createElement('bpmn:ExtensionElements', { values: [entry] }, bo, bpmnFactory); 36 | return { extensionElements : extensionElements }; 37 | } else { 38 | // add new failedJobRetryExtensionElement to existing extensionElements list 39 | return cmdHelper.addElementsTolist(element, extensionElements, 'values', [entry]); 40 | } 41 | }; 42 | 43 | ExtensionElementsHelper.removeEntry = function(bo, element, entry) { 44 | var extensionElements = bo.get('extensionElements'); 45 | 46 | if (!extensionElements) { 47 | 48 | // return an empty command when there is no extensionElements list 49 | return {}; 50 | } 51 | 52 | return cmdHelper.removeElementsFromList(element, extensionElements, 'values', 'extensionElements', [entry]); 53 | }; 54 | 55 | module.exports = ExtensionElementsHelper; 56 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/helper/ParticipantHelper.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var is = require('bpmn-js/lib/util/ModelUtil').is, 4 | getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject, 5 | cmdHelper = require('./CmdHelper'); 6 | 7 | 8 | var ParticipantHelper = {}; 9 | 10 | module.exports = ParticipantHelper; 11 | 12 | ParticipantHelper.modifyProcessBusinessObject = function(element, property, values) { 13 | if (!is(element, 'bpmn:Participant')) { 14 | return {}; 15 | } 16 | 17 | var bo = getBusinessObject(element).get('processRef'), 18 | properties = {}; 19 | 20 | properties[property] = values[property]; 21 | 22 | return cmdHelper.updateBusinessObject(element, bo, properties); 23 | }; 24 | 25 | ParticipantHelper.getProcessBusinessObject = function(element, propertyName) { 26 | if (!is(element, 'bpmn:Participant')) { 27 | return {}; 28 | } 29 | 30 | var bo = getBusinessObject(element).get('processRef'), 31 | properties = {}; 32 | 33 | properties[propertyName] = bo.get(propertyName); 34 | 35 | return properties; 36 | }; -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | __depends__: [ 3 | require('./index'), 4 | require('diagram-js/lib/i18n/translate').default 5 | ], 6 | __init__: [ 'propertiesPanel' ], 7 | propertiesPanel: [ 'type', require('./PropertiesPanel') ] 8 | }; 9 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/element-templates/ElementTemplates.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var values = require('lodash/values'); 4 | 5 | /** 6 | * The guy knowing all configured element templates. 7 | * 8 | * This registry won't validate. Use the {@link Validator} 9 | * to verify a template is valid prior to adding it to 10 | * this registry. 11 | */ 12 | function ElementTemplates() { 13 | 14 | this._templates = {}; 15 | 16 | /** 17 | * Sets the known element templates. 18 | * 19 | * @param {Array} descriptors 20 | * 21 | * @return {ElementTemplates} 22 | */ 23 | this.set = function(descriptors) { 24 | 25 | var templates = this._templates = {}; 26 | 27 | descriptors.forEach(function(descriptor) { 28 | templates[descriptor.id] = descriptor; 29 | }); 30 | 31 | return this; 32 | }; 33 | 34 | /** 35 | * Get template descriptor with given id. 36 | * 37 | * @param {String} id 38 | * 39 | * @return {TemplateDescriptor} 40 | */ 41 | this.get = function(id) { 42 | return this._templates[id]; 43 | }; 44 | 45 | /** 46 | * Return all known template descriptors. 47 | * 48 | * @return {Array} 49 | */ 50 | this.getAll = function() { 51 | return values(this._templates); 52 | }; 53 | 54 | } 55 | 56 | module.exports = ElementTemplates; -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/element-templates/cmd/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var ChangeElementTemplateHandler = require('./ChangeElementTemplateHandler'); 4 | 5 | var getTemplate = require('../Helper').getTemplate, 6 | getDefaultTemplate = require('../Helper').getDefaultTemplate; 7 | 8 | function registerHandlers(commandStack, elementTemplates, eventBus, elementRegistry) { 9 | commandStack.registerHandler( 10 | 'propertiesPanel.activiti.changeTemplate', 11 | ChangeElementTemplateHandler 12 | ); 13 | 14 | // apply default element templates on shape creation 15 | eventBus.on([ 'commandStack.shape.create.postExecuted' ], function(context) { 16 | applyDefaultTemplate(context.context.shape, elementTemplates, commandStack); 17 | }); 18 | 19 | // apply default element templates on connection creation 20 | eventBus.on([ 'commandStack.connection.create.postExecuted' ], function(context) { 21 | applyDefaultTemplate(context.context.connection, elementTemplates, commandStack); 22 | }); 23 | } 24 | 25 | registerHandlers.$inject = [ 'commandStack', 'elementTemplates', 'eventBus', 'elementRegistry' ]; 26 | 27 | 28 | module.exports = { 29 | __init__: [ registerHandlers ] 30 | }; 31 | 32 | 33 | function applyDefaultTemplate(element, elementTemplates, commandStack) { 34 | 35 | if (!getTemplate(element, elementTemplates) 36 | && getDefaultTemplate(element, elementTemplates)) { 37 | 38 | var command = 'propertiesPanel.activiti.changeTemplate'; 39 | var commandContext = { 40 | element: element, 41 | newTemplate: getDefaultTemplate(element, elementTemplates) 42 | }; 43 | 44 | commandStack.execute(command, commandContext); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/element-templates/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | __depends__: [ 3 | require('./cmd/index'), 4 | require('diagram-js/lib/i18n/translate').default 5 | ], 6 | __init__: [ 7 | 'customElementsPropertiesActivator', 8 | 'elementTemplatesLoader' 9 | ], 10 | customElementsPropertiesActivator: [ 'type', require('./CustomElementsPropertiesActivator') ], 11 | elementTemplates: [ 'type', require('./ElementTemplates') ], 12 | elementTemplatesLoader: [ 'type', require('./ElementTemplatesLoader') ] 13 | }; 14 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/element-templates/util/validate.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Validator = require('../Validator'); 4 | 5 | /** 6 | * Validate the given template descriptors and 7 | * return a list of errors. 8 | * 9 | * @param {Array} descriptors 10 | * 11 | * @return {Array} 12 | */ 13 | module.exports = function validate(descriptors) { 14 | 15 | return new Validator().addAll(descriptors).getErrors(); 16 | }; -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | __depends__: [ 3 | require('./element-templates/index'), 4 | require('diagram-js/lib/i18n/translate').default 5 | ], 6 | __init__: [ 'propertiesProvider' ], 7 | propertiesProvider: [ 'type', require('./ActivitiPropertiesProvider') ] 8 | }; 9 | 10 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/parts/AsynchronousContinuationProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject, 4 | is = require('bpmn-js/lib/util/ModelUtil').is, 5 | asyncContinuation = require('./implementation/AsyncContinuation'); 6 | 7 | module.exports = function(group, element, bpmnFactory, translate) { 8 | 9 | if (is(element, 'activiti:AsyncCapable')) { 10 | 11 | group.entries = group.entries.concat(asyncContinuation(element, bpmnFactory, { 12 | getBusinessObject: getBusinessObject 13 | }, translate)); 14 | 15 | } 16 | }; -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/parts/CandidateStarterProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var is = require('bpmn-js/lib/util/ModelUtil').is, 4 | getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject; 5 | 6 | var candidateStarter = require('./implementation/CandidateStarter'); 7 | 8 | module.exports = function(group, element, bpmnFactory, translate) { 9 | var businessObject = getBusinessObject(element); 10 | 11 | if (is(element, 'activiti:Process') || 12 | is(element, 'bpmn:Participant') && businessObject.get('processRef')) { 13 | 14 | group.entries = group.entries.concat(candidateStarter(element, bpmnFactory, { 15 | getBusinessObject: function(element) { 16 | var bo = getBusinessObject(element); 17 | 18 | if (!is(bo, 'bpmn:Participant')) { 19 | return bo; 20 | } 21 | 22 | return bo.get('processRef'); 23 | } 24 | }, translate)); 25 | 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/parts/ConnectorDetailProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var ImplementationTypeHelper = require('../../../helper/ImplementationTypeHelper'), 4 | InputOutputHelper = require('../../../helper/InputOutputHelper'); 5 | 6 | var entryFactory = require('../../../factory/EntryFactory'), 7 | cmdHelper = require('../../../helper/CmdHelper'); 8 | 9 | function getImplementationType(element) { 10 | return ImplementationTypeHelper.getImplementationType(element); 11 | } 12 | 13 | function getBusinessObject(element) { 14 | return ImplementationTypeHelper.getServiceTaskLikeBusinessObject(element); 15 | } 16 | 17 | function getConnector(bo) { 18 | return InputOutputHelper.getConnector(bo); 19 | } 20 | 21 | function isConnector(element) { 22 | return getImplementationType(element) === 'connector'; 23 | } 24 | 25 | module.exports = function(group, element, bpmnFactory, translate) { 26 | 27 | group.entries.push(entryFactory.textField({ 28 | id: 'connectorId', 29 | label: translate('Connector Id'), 30 | modelProperty: 'connectorId', 31 | 32 | get: function(element, node) { 33 | var bo = getBusinessObject(element); 34 | var connector = bo && getConnector(bo); 35 | var value = connector && connector.get('connectorId'); 36 | return { connectorId: value }; 37 | }, 38 | 39 | set: function(element, values, node) { 40 | var bo = getBusinessObject(element); 41 | var connector = getConnector(bo); 42 | return cmdHelper.updateBusinessObject(element, connector, { 43 | connectorId: values.connectorId || undefined 44 | }); 45 | }, 46 | 47 | validate: function(element, values, node) { 48 | return isConnector(element) && !values.connectorId ? { connectorId: translate('Must provide a value') } : {}; 49 | }, 50 | 51 | hidden: function(element, node) { 52 | return !isConnector(element); 53 | } 54 | 55 | })); 56 | 57 | }; 58 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/parts/ConnectorInputOutputParameterProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var assign = require('lodash/assign'); 4 | 5 | var inputOutputParameter = require('./implementation/InputOutputParameter'); 6 | 7 | module.exports = function(group, element, bpmnFactory, options, translate) { 8 | 9 | options = assign({ 10 | idPrefix: 'connector-', 11 | insideConnector: true 12 | }, options); 13 | 14 | group.entries = group.entries.concat(inputOutputParameter(element, bpmnFactory, options, translate)); 15 | 16 | }; 17 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/parts/ConnectorInputOutputProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var inputOutput = require('./implementation/InputOutput'); 4 | 5 | module.exports = function(group, element, bpmnFactory, translate) { 6 | 7 | var inputOutputEntry = inputOutput(element, bpmnFactory, { 8 | idPrefix: 'connector-', 9 | insideConnector: true 10 | }, translate); 11 | 12 | group.entries = group.entries.concat(inputOutputEntry.entries); 13 | 14 | return { 15 | getSelectedParameter: inputOutputEntry.getSelectedParameter 16 | }; 17 | 18 | }; 19 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/parts/ErrorEventProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var is = require('bpmn-js/lib/util/ModelUtil').is, 4 | eventDefinitionHelper = require('../../../helper/EventDefinitionHelper'), 5 | error = require('./implementation/ErrorEventDefinition'); 6 | 7 | var forEach = require('lodash/forEach'); 8 | 9 | 10 | module.exports = function(group, element, bpmnFactory, translate) { 11 | 12 | var errorEvents = [ 13 | 'bpmn:StartEvent', 14 | 'bpmn:BoundaryEvent', 15 | 'bpmn:EndEvent' 16 | ]; 17 | 18 | forEach(errorEvents, function(event) { 19 | if (is(element, event)) { 20 | 21 | var errorEventDefinition = eventDefinitionHelper.getErrorEventDefinition(element); 22 | 23 | if (errorEventDefinition) { 24 | var isCatchingErrorEvent = is(element, 'bpmn:StartEvent') || is (element, 'bpmn:BoundaryEvent'); 25 | 26 | var showErrorCodeVariable = isCatchingErrorEvent, 27 | showErrorMessageVariable = isCatchingErrorEvent; 28 | 29 | error( 30 | group, 31 | element, 32 | bpmnFactory, 33 | errorEventDefinition, 34 | showErrorCodeVariable, 35 | showErrorMessageVariable, 36 | translate); 37 | } 38 | } 39 | }); 40 | }; 41 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/parts/ExternalTaskConfigurationProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var is = require('bpmn-js/lib/util/ModelUtil').is, 4 | getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject; 5 | 6 | var ImplementationTypeHelper = require('../../../helper/ImplementationTypeHelper'); 7 | 8 | var externalTaskPriority = require('./implementation/ExternalTaskPriority'); 9 | 10 | function getServiceTaskLikeBusinessObject(element) { 11 | var bo = ImplementationTypeHelper.getServiceTaskLikeBusinessObject(element); 12 | 13 | // if the element is not a serviceTaskLike element, fetch the normal business object 14 | // This avoids the loss of the process / participant business object 15 | if (!bo) { 16 | bo = getBusinessObject(element); 17 | } 18 | 19 | return bo; 20 | } 21 | 22 | module.exports = function(group, element, bpmnFactory, translate) { 23 | 24 | var bo = getServiceTaskLikeBusinessObject(element); 25 | 26 | if (!bo) { 27 | return; 28 | } 29 | 30 | if (is(bo, 'activiti:TaskPriorized') || (is(bo, 'bpmn:Participant')) && bo.get('processRef')) { 31 | group.entries = group.entries.concat(externalTaskPriority(element, bpmnFactory, { 32 | getBusinessObject: function(element) { 33 | if (!is(bo, 'bpmn:Participant')) { 34 | return bo; 35 | } 36 | return bo.get('processRef'); 37 | } 38 | }, translate)); 39 | } 40 | }; -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/parts/FieldInjectionProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var ImplementationTypeHelper = require('../../../helper/ImplementationTypeHelper'); 4 | 5 | var fieldInjection = require('./implementation/FieldInjection'); 6 | 7 | module.exports = function(group, element, bpmnFactory, translate) { 8 | 9 | var bo = ImplementationTypeHelper.getServiceTaskLikeBusinessObject(element); 10 | 11 | if (!bo) { 12 | return; 13 | } 14 | 15 | var fieldInjectionEntry = fieldInjection(element, bpmnFactory, translate, { businessObject: bo }); 16 | 17 | if (fieldInjectionEntry && fieldInjectionEntry.length > 0) { 18 | group.entries = group.entries.concat(fieldInjectionEntry); 19 | } 20 | 21 | }; 22 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/parts/HistoryTimeToLiveProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var is = require('bpmn-js/lib/util/ModelUtil').is, 4 | getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject; 5 | 6 | var historyTimeToLive = require('./implementation/HistoryTimeToLive'); 7 | 8 | module.exports = function(group, element, bpmnFactory, translate) { 9 | var businessObject = getBusinessObject(element); 10 | 11 | if (is(element, 'activiti:Process') || 12 | is(element, 'bpmn:Participant') && businessObject.get('processRef')) { 13 | 14 | group.entries = group.entries.concat(historyTimeToLive(element, bpmnFactory, { 15 | getBusinessObject: function(element) { 16 | var bo = getBusinessObject(element); 17 | 18 | if (!is(bo, 'bpmn:Participant')) { 19 | return bo; 20 | } 21 | 22 | return bo.get('processRef'); 23 | } 24 | }, translate)); 25 | 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/parts/InputOutputParameterProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var inputOutputParameter = require('./implementation/InputOutputParameter'); 4 | 5 | var assign = require('lodash/assign'); 6 | 7 | module.exports = function(group, element, bpmnFactory, options, translate) { 8 | 9 | group.entries = group.entries.concat(inputOutputParameter(element, bpmnFactory, assign({}, options), translate)); 10 | 11 | }; 12 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/parts/InputOutputProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var inputOutput = require('./implementation/InputOutput'); 4 | 5 | module.exports = function(group, element, bpmnFactory, translate) { 6 | 7 | var inputOutputEntry = inputOutput(element, bpmnFactory, {}, translate); 8 | 9 | group.entries = group.entries.concat(inputOutputEntry.entries); 10 | 11 | return { 12 | getSelectedParameter: inputOutputEntry.getSelectedParameter 13 | }; 14 | 15 | }; 16 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/parts/JobConfigurationProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var is = require('bpmn-js/lib/util/ModelUtil').is, 4 | getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject; 5 | 6 | var jobPriority = require('./implementation/JobPriority'), 7 | jobRetryTimeCycle = require('./implementation/JobRetryTimeCycle'); 8 | 9 | module.exports = function(group, element, bpmnFactory, translate) { 10 | var businessObject = getBusinessObject(element); 11 | 12 | if (is(element, 'activiti:JobPriorized') || 13 | is(element, 'bpmn:Participant') && businessObject.get('processRef')) { 14 | 15 | group.entries = group.entries.concat(jobPriority(element, bpmnFactory, { 16 | getBusinessObject: function(element) { 17 | var bo = getBusinessObject(element); 18 | 19 | if (!is(bo, 'bpmn:Participant')) { 20 | return bo; 21 | } 22 | 23 | return bo.get('processRef'); 24 | } 25 | }, translate)); 26 | } 27 | 28 | if (is(element, 'activiti:AsyncCapable')) { 29 | group.entries = group.entries.concat(jobRetryTimeCycle(element, bpmnFactory, { 30 | getBusinessObject: getBusinessObject 31 | }, translate)); 32 | } 33 | 34 | }; 35 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/parts/ListenerFieldInjectionProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var assign = require('lodash/assign'); 4 | 5 | var fieldInjection = require('./implementation/FieldInjection'); 6 | 7 | module.exports = function(group, element, bpmnFactory, options, translate) { 8 | 9 | options = assign({ 10 | idPrefix: 'listener-', 11 | insideListener: true 12 | }, options); 13 | 14 | var fieldInjectionEntry = fieldInjection(element, bpmnFactory, translate, options); 15 | 16 | if (fieldInjectionEntry && fieldInjectionEntry.length > 0) { 17 | group.entries = group.entries.concat(fieldInjectionEntry); 18 | } 19 | 20 | }; 21 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/parts/ListenerProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var listener = require('./implementation/Listener'); 4 | 5 | module.exports = function(group, element, bpmnFactory, translate) { 6 | 7 | var listenerEntry = listener(element, bpmnFactory, {}, translate); 8 | 9 | group.entries = group.entries.concat(listenerEntry.entries); 10 | 11 | return { 12 | getSelectedListener: listenerEntry.getSelectedListener 13 | }; 14 | 15 | }; 16 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/parts/MultiInstanceLoopProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject, 4 | is = require('bpmn-js/lib/util/ModelUtil').is; 5 | 6 | var multiInstanceLoopCharacteristics = require('./implementation/MultiInstanceLoopCharacteristics'); 7 | 8 | var jobRetryTimeCycle = require('./implementation/JobRetryTimeCycle'), 9 | asyncContinuation = require('./implementation/AsyncContinuation'); 10 | 11 | 12 | function getLoopCharacteristics(element) { 13 | var bo = getBusinessObject(element); 14 | return bo.loopCharacteristics; 15 | } 16 | 17 | 18 | function ensureMultiInstanceSupported(element) { 19 | var loopCharacteristics = getLoopCharacteristics(element); 20 | return !!loopCharacteristics && is(loopCharacteristics, 'activiti:Collectable'); 21 | } 22 | 23 | module.exports = function(group, element, bpmnFactory, translate) { 24 | 25 | if (!ensureMultiInstanceSupported(element)) { 26 | return; 27 | } 28 | 29 | // multi instance properties 30 | group.entries = group.entries.concat(multiInstanceLoopCharacteristics(element, bpmnFactory, translate)); 31 | 32 | // async continuation /////////////////////////////////////////////////////// 33 | group.entries = group.entries.concat(asyncContinuation(element, bpmnFactory, { 34 | getBusinessObject: getLoopCharacteristics, 35 | idPrefix: 'multiInstance-', 36 | labelPrefix: translate('Multi Instance ') 37 | }, translate)); 38 | 39 | 40 | // retry time cycle ////////////////////////////////////////////////////////// 41 | group.entries = group.entries.concat(jobRetryTimeCycle(element, bpmnFactory, { 42 | getBusinessObject: getLoopCharacteristics, 43 | idPrefix: 'multiInstance-', 44 | labelPrefix: translate('Multi Instance ') 45 | }, translate)); 46 | }; 47 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/parts/PropertiesProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var properties = require('./implementation/Properties'), 4 | elementHelper = require('../../../helper/ElementHelper'), 5 | cmdHelper = require('../../../helper/CmdHelper'); 6 | 7 | 8 | module.exports = function(group, element, bpmnFactory, translate) { 9 | 10 | var propertiesEntry = properties(element, bpmnFactory, { 11 | id: 'properties', 12 | modelProperties: [ 'name', 'value' ], 13 | labels: [ translate('Name'), translate('Value') ], 14 | 15 | getParent: function(element, node, bo) { 16 | return bo.extensionElements; 17 | }, 18 | 19 | createParent: function(element, bo) { 20 | var parent = elementHelper.createElement('bpmn:ExtensionElements', { values: [] }, bo, bpmnFactory); 21 | var cmd = cmdHelper.updateBusinessObject(element, bo, { extensionElements: parent }); 22 | return { 23 | cmd: cmd, 24 | parent: parent 25 | }; 26 | } 27 | }, translate); 28 | 29 | if (propertiesEntry) { 30 | group.entries.push(propertiesEntry); 31 | } 32 | 33 | }; 34 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/parts/ScriptTaskProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject, 4 | is = require('bpmn-js/lib/util/ModelUtil').is, 5 | entryFactory = require('../../../factory/EntryFactory'), 6 | cmdHelper = require('../../../helper/CmdHelper'), 7 | scriptImplementation = require('./implementation/Script'); 8 | 9 | 10 | module.exports = function(group, element, bpmnFactory, translate) { 11 | var bo; 12 | 13 | if (is(element, 'bpmn:ScriptTask')) { 14 | bo = getBusinessObject(element); 15 | } 16 | 17 | if (!bo) { 18 | return; 19 | } 20 | 21 | var script = scriptImplementation('scriptFormat', 'script', false, translate); 22 | group.entries.push({ 23 | id: 'script-implementation', 24 | label: translate('Script'), 25 | html: script.template, 26 | 27 | get: function(element) { 28 | return script.get(element, bo); 29 | }, 30 | 31 | set: function(element, values, containerElement) { 32 | var properties = script.set(element, values, containerElement); 33 | 34 | return cmdHelper.updateProperties(element, properties); 35 | }, 36 | 37 | validate: function(element, values) { 38 | return script.validate(element, values); 39 | }, 40 | 41 | script : script, 42 | 43 | cssClasses: ['bpp-textfield'] 44 | 45 | }); 46 | 47 | group.entries.push(entryFactory.textField({ 48 | id : 'scriptResultVariable', 49 | label : translate('Result Variable'), 50 | modelProperty : 'scriptResultVariable', 51 | 52 | get: function(element, propertyName) { 53 | var boResultVariable = bo.get('activiti:resultVariable'); 54 | 55 | return { scriptResultVariable : boResultVariable }; 56 | }, 57 | 58 | set: function(element, values, containerElement) { 59 | return cmdHelper.updateProperties(element, { 60 | 'activiti:resultVariable': values.scriptResultVariable.length 61 | ? values.scriptResultVariable 62 | : undefined 63 | }); 64 | } 65 | 66 | })); 67 | 68 | }; 69 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/parts/StartEventInitiator.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var entryFactory = require('../../../factory/EntryFactory'), 4 | is = require('bpmn-js/lib/util/ModelUtil').is, 5 | getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject; 6 | 7 | 8 | module.exports = function(group, element, translate) { 9 | 10 | var bo = getBusinessObject(element); 11 | 12 | if (!bo) { 13 | return; 14 | } 15 | 16 | if (is(element, 'activiti:Initiator') && !is(element.parent, 'bpmn:SubProcess')) { 17 | group.entries.push(entryFactory.textField({ 18 | id: 'initiator', 19 | label: translate('Initiator'), 20 | modelProperty: 'initiator' 21 | })); 22 | } 23 | }; 24 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/parts/TasklistProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var is = require('bpmn-js/lib/util/ModelUtil').is, 4 | getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject; 5 | 6 | var tasklist = require('./implementation/Tasklist'); 7 | 8 | module.exports = function(group, element, bpmnFactory, translate) { 9 | var businessObject = getBusinessObject(element); 10 | 11 | if (is(element, 'activiti:Process') || 12 | is(element, 'bpmn:Participant') && businessObject.get('processRef')) { 13 | 14 | group.entries = group.entries.concat(tasklist(element, bpmnFactory, { 15 | getBusinessObject: function(element) { 16 | var bo = getBusinessObject(element); 17 | 18 | if (!is(bo, 'bpmn:Participant')) { 19 | return bo; 20 | } 21 | 22 | return bo.get('processRef'); 23 | } 24 | }, translate)); 25 | 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/parts/UserTaskProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var is = require('bpmn-js/lib/util/ModelUtil').is, 4 | entryFactory = require('../../../factory/EntryFactory'); 5 | 6 | 7 | module.exports = function(group, element, translate) { 8 | if (is(element, 'activiti:Assignable')) { 9 | 10 | // Assignee 11 | group.entries.push(entryFactory.textField({ 12 | id : 'assignee', 13 | label : translate('Assignee'), 14 | modelProperty : 'assignee' 15 | })); 16 | 17 | // Candidate Users 18 | group.entries.push(entryFactory.textField({ 19 | id : 'candidateUsers', 20 | label : translate('Candidate Users'), 21 | modelProperty : 'candidateUsers' 22 | })); 23 | 24 | // Candidate Groups 25 | group.entries.push(entryFactory.textField({ 26 | id : 'candidateGroups', 27 | label : translate('Candidate Groups'), 28 | modelProperty : 'candidateGroups' 29 | })); 30 | 31 | // Due Date 32 | group.entries.push(entryFactory.textField({ 33 | id : 'dueDate', 34 | description : translate('The due date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)'), 35 | label : translate('Due Date'), 36 | modelProperty : 'dueDate' 37 | })); 38 | 39 | // FollowUp Date 40 | group.entries.push(entryFactory.textField({ 41 | id : 'followUpDate', 42 | description : translate('The follow up date as an EL expression (e.g. ${someDate} or an ' + 43 | 'ISO date (e.g. 2015-06-26T09:54:00)'), 44 | label : translate('Follow Up Date'), 45 | modelProperty : 'followUpDate' 46 | })); 47 | 48 | // priority 49 | group.entries.push(entryFactory.textField({ 50 | id : 'priority', 51 | label : translate('Priority'), 52 | modelProperty : 'priority' 53 | })); 54 | } 55 | }; 56 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/parts/VersionTagProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var entryFactory = require('../../../factory/EntryFactory'), 4 | cmdHelper = require('../../../helper/CmdHelper'), 5 | is = require('bpmn-js/lib/util/ModelUtil').is, 6 | getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject; 7 | 8 | module.exports = function(group, element, translate) { 9 | 10 | var bo = getBusinessObject(element); 11 | 12 | if (!bo) { 13 | return; 14 | } 15 | 16 | if (is(element, 'bpmn:Process') || is(element, 'bpmn:Participant') && bo.get('processRef')) { 17 | var versionTagEntry = entryFactory.textField({ 18 | id: 'versionTag', 19 | label: translate('Version Tag'), 20 | modelProperty: 'versionTag' 21 | }); 22 | 23 | // in participants we have to change the default behavior of set and get 24 | if (is(element, 'bpmn:Participant')) { 25 | versionTagEntry.get = function(element) { 26 | var processBo = bo.get('processRef'); 27 | 28 | return { 29 | versionTag: processBo.get('activiti:versionTag') 30 | }; 31 | }; 32 | 33 | versionTagEntry.set = function(element, values) { 34 | var processBo = bo.get('processRef'); 35 | 36 | return cmdHelper.updateBusinessObject(element, processBo, { 37 | 'activiti:versionTag': values.versionTag || undefined 38 | }); 39 | }; 40 | } 41 | 42 | group.entries.push(versionTagEntry); 43 | 44 | } 45 | }; 46 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/parts/implementation/CandidateStarter.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var entryFactory = require('../../../../factory/EntryFactory'); 4 | 5 | var cmdHelper = require('../../../../helper/CmdHelper'); 6 | 7 | module.exports = function(element, bpmnFactory, options, translate) { 8 | 9 | var getBusinessObject = options.getBusinessObject; 10 | 11 | var candidateStarterGroupsEntry = entryFactory.textField({ 12 | id: 'candidateStarterGroups', 13 | label: translate('Candidate Starter Groups'), 14 | modelProperty: 'candidateStarterGroups', 15 | description: translate('Specify more than one group as a comma separated list.'), 16 | 17 | get: function(element, node) { 18 | var bo = getBusinessObject(element); 19 | var candidateStarterGroups = bo.get('activiti:candidateStarterGroups'); 20 | 21 | return { 22 | candidateStarterGroups: candidateStarterGroups ? candidateStarterGroups : '' 23 | }; 24 | }, 25 | 26 | set: function(element, values) { 27 | var bo = getBusinessObject(element); 28 | return cmdHelper.updateBusinessObject(element, bo, { 29 | 'activiti:candidateStarterGroups': values.candidateStarterGroups || undefined 30 | }); 31 | } 32 | 33 | }); 34 | 35 | var candidateStarterUsersEntry = entryFactory.textField({ 36 | id: 'candidateStarterUsers', 37 | label: translate('Candidate Starter Users'), 38 | modelProperty: 'candidateStarterUsers', 39 | description: translate('Specify more than one user as a comma separated list.'), 40 | 41 | get: function(element, node) { 42 | var bo = getBusinessObject(element); 43 | var candidateStarterUsers = bo.get('activiti:candidateStarterUsers'); 44 | 45 | return { 46 | candidateStarterUsers: candidateStarterUsers ? candidateStarterUsers : '' 47 | }; 48 | }, 49 | 50 | set: function(element, values) { 51 | var bo = getBusinessObject(element); 52 | return cmdHelper.updateBusinessObject(element, bo, { 53 | 'activiti:candidateStarterUsers': values.candidateStarterUsers || undefined 54 | }); 55 | } 56 | 57 | }); 58 | 59 | return [ 60 | candidateStarterGroupsEntry, 61 | candidateStarterUsersEntry 62 | ]; 63 | }; 64 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/parts/implementation/ErrorEventDefinition.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var entryFactory = require('../../../../factory/EntryFactory'), 4 | cmdHelper = require('../../../../helper/CmdHelper'), 5 | elementReferenceProperty = require('../../../../provider/bpmn/parts/implementation/ElementReferenceProperty'); 6 | 7 | module.exports = function( 8 | group, element, bpmnFactory, errorEventDefinition, 9 | showErrorCodeVariable, showErrorMessageVariable, translate 10 | ) { 11 | 12 | 13 | var getValue = function(modelProperty) { 14 | return function(element) { 15 | var modelPropertyValue = errorEventDefinition.get('activiti:' + modelProperty); 16 | var value = {}; 17 | 18 | value[modelProperty] = modelPropertyValue; 19 | return value; 20 | }; 21 | }; 22 | 23 | var setValue = function(modelProperty) { 24 | return function(element, values) { 25 | var props = {}; 26 | 27 | props['activiti:' + modelProperty] = values[modelProperty] || undefined; 28 | 29 | return cmdHelper.updateBusinessObject(element, errorEventDefinition, props); 30 | }; 31 | }; 32 | 33 | 34 | group.entries = group.entries.concat( 35 | elementReferenceProperty(element, errorEventDefinition, bpmnFactory, { 36 | id: 'error-element-message', 37 | label: translate('Error Message'), 38 | referenceProperty: 'errorRef', 39 | modelProperty: 'errorMessage' 40 | }) 41 | ); 42 | 43 | if (showErrorCodeVariable) { 44 | group.entries.push(entryFactory.textField({ 45 | id: 'errorCodeVariable', 46 | label: translate('Error Code Variable'), 47 | modelProperty : 'errorCodeVariable', 48 | 49 | get: getValue('errorCodeVariable'), 50 | set: setValue('errorCodeVariable') 51 | })); 52 | } 53 | 54 | if (showErrorMessageVariable) { 55 | group.entries.push(entryFactory.textField({ 56 | id: 'errorMessageVariable', 57 | label: translate('Error Message Variable'), 58 | modelProperty: 'errorMessageVariable', 59 | 60 | get: getValue('errorMessageVariable'), 61 | set: setValue('errorMessageVariable') 62 | })); 63 | } 64 | 65 | }; 66 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/parts/implementation/External.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var entryFactory = require('../../../../factory/EntryFactory'), 4 | cmdHelper = require('../../../../helper/CmdHelper'); 5 | 6 | module.exports = function(element, bpmnFactory, options, translate) { 7 | 8 | var getImplementationType = options.getImplementationType, 9 | getBusinessObject = options.getBusinessObject; 10 | 11 | function isExternal(element) { 12 | return getImplementationType(element) === 'external'; 13 | } 14 | 15 | var topicEntry = entryFactory.textField({ 16 | id: 'externalTopic', 17 | label: translate('Topic'), 18 | modelProperty: 'externalTopic', 19 | 20 | get: function(element, node) { 21 | var bo = getBusinessObject(element); 22 | return { externalTopic: bo.get('activiti:topic') }; 23 | }, 24 | 25 | set: function(element, values, node) { 26 | var bo = getBusinessObject(element); 27 | return cmdHelper.updateBusinessObject(element, bo, { 28 | 'activiti:topic': values.externalTopic 29 | }); 30 | }, 31 | 32 | validate: function(element, values, node) { 33 | return isExternal(element) && !values.externalTopic ? { externalTopic: translate('Must provide a value') } : {}; 34 | }, 35 | 36 | hidden: function(element, node) { 37 | return !isExternal(element); 38 | } 39 | 40 | }); 41 | 42 | return [ topicEntry ]; 43 | 44 | }; 45 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/parts/implementation/ExternalTaskPriority.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var entryFactory = require('../../../../factory/EntryFactory'); 4 | 5 | var cmdHelper = require('../../../../helper/CmdHelper'); 6 | 7 | module.exports = function(element, bpmnFactory, options, translate) { 8 | 9 | var getBusinessObject = options.getBusinessObject; 10 | 11 | var externalTaskPriorityEntry = entryFactory.textField({ 12 | id: 'externalTaskPriority', 13 | label: translate('Task Priority'), 14 | modelProperty: 'taskPriority', 15 | 16 | get: function(element, node) { 17 | var bo = getBusinessObject(element); 18 | return { 19 | taskPriority: bo.get('activiti:taskPriority') 20 | }; 21 | }, 22 | 23 | set: function(element, values) { 24 | var bo = getBusinessObject(element); 25 | return cmdHelper.updateBusinessObject(element, bo, { 26 | 'activiti:taskPriority': values.taskPriority || undefined 27 | }); 28 | } 29 | 30 | }); 31 | 32 | return [ externalTaskPriorityEntry ]; 33 | 34 | }; 35 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/parts/implementation/HistoryTimeToLive.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var entryFactory = require('../../../../factory/EntryFactory'); 4 | 5 | var cmdHelper = require('../../../../helper/CmdHelper'); 6 | 7 | module.exports = function(element, bpmnFactory, options, translate) { 8 | 9 | var getBusinessObject = options.getBusinessObject; 10 | 11 | var historyTimeToLiveEntry = entryFactory.textField({ 12 | id: 'historyTimeToLive', 13 | label: translate('History Time To Live'), 14 | modelProperty: 'historyTimeToLive', 15 | 16 | get: function(element, node) { 17 | var bo = getBusinessObject(element); 18 | var historyTimeToLive = bo.get('activiti:historyTimeToLive'); 19 | 20 | return { 21 | historyTimeToLive: historyTimeToLive ? historyTimeToLive : '' 22 | }; 23 | }, 24 | 25 | set: function(element, values) { 26 | var bo = getBusinessObject(element); 27 | return cmdHelper.updateBusinessObject(element, bo, { 28 | 'activiti:historyTimeToLive': values.historyTimeToLive || undefined 29 | }); 30 | } 31 | 32 | }); 33 | 34 | return [ historyTimeToLiveEntry ]; 35 | }; 36 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/parts/implementation/JobPriority.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var entryFactory = require('../../../../factory/EntryFactory'); 4 | 5 | var cmdHelper = require('../../../../helper/CmdHelper'); 6 | 7 | module.exports = function(element, bpmnFactory, options, translate) { 8 | 9 | var getBusinessObject = options.getBusinessObject; 10 | 11 | var jobPriorityEntry = entryFactory.textField({ 12 | id: 'jobPriority', 13 | label: translate('Job Priority'), 14 | modelProperty: 'jobPriority', 15 | 16 | get: function(element, node) { 17 | var bo = getBusinessObject(element); 18 | return { 19 | jobPriority: bo.get('activiti:jobPriority') 20 | }; 21 | }, 22 | 23 | set: function(element, values) { 24 | var bo = getBusinessObject(element); 25 | return cmdHelper.updateBusinessObject(element, bo, { 26 | 'activiti:jobPriority': values.jobPriority || undefined 27 | }); 28 | } 29 | 30 | }); 31 | 32 | return [ jobPriorityEntry ]; 33 | 34 | }; 35 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/parts/implementation/ResultVariable.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var is = require('bpmn-js/lib/util/ModelUtil').is; 4 | 5 | var assign = require('lodash/assign'); 6 | 7 | var entryFactory = require('../../../../factory/EntryFactory'), 8 | cmdHelper = require('../../../../helper/CmdHelper'); 9 | 10 | module.exports = function(element, bpmnFactory, options, translate) { 11 | 12 | var getBusinessObject = options.getBusinessObject, 13 | hideResultVariable = options.hideResultVariable, 14 | id = options.id || 'resultVariable'; 15 | 16 | 17 | var resultVariableEntry = entryFactory.textField({ 18 | id: id, 19 | label: translate('Result Variable'), 20 | modelProperty: 'resultVariable', 21 | 22 | get: function(element, node) { 23 | var bo = getBusinessObject(element); 24 | return { resultVariable: bo.get('activiti:resultVariable') }; 25 | }, 26 | 27 | set: function(element, values, node) { 28 | var bo = getBusinessObject(element); 29 | 30 | var resultVariable = values.resultVariable || undefined; 31 | 32 | var props = { 33 | 'activiti:resultVariable': resultVariable 34 | }; 35 | 36 | if (is(bo, 'activiti:DmnCapable') && !resultVariable) { 37 | props = assign({ 'activiti:mapDecisionResult': 'resultList' }, props); 38 | } 39 | 40 | return cmdHelper.updateBusinessObject(element, bo, props); 41 | }, 42 | 43 | hidden: function(element, node) { 44 | if (typeof hideResultVariable === 'function') { 45 | return hideResultVariable.apply(resultVariableEntry, arguments); 46 | } 47 | } 48 | 49 | }); 50 | 51 | return [ resultVariableEntry ]; 52 | 53 | }; 54 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/activiti/parts/implementation/Tasklist.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var entryFactory = require('../../../../factory/EntryFactory'); 4 | 5 | var cmdHelper = require('../../../../helper/CmdHelper'); 6 | 7 | module.exports = function(element, bpmnFactory, options, translate) { 8 | 9 | var getBusinessObject = options.getBusinessObject; 10 | 11 | var isStartableInTasklistEntry = entryFactory.checkbox({ 12 | id: 'isStartableInTasklist', 13 | label: translate('Startable'), 14 | modelProperty: 'isStartableInTasklist', 15 | 16 | get: function(element, node) { 17 | var bo = getBusinessObject(element); 18 | var isStartableInTasklist = bo.get('activiti:isStartableInTasklist'); 19 | 20 | return { 21 | isStartableInTasklist: isStartableInTasklist ? isStartableInTasklist : '' 22 | }; 23 | }, 24 | 25 | set: function(element, values) { 26 | var bo = getBusinessObject(element); 27 | return cmdHelper.updateBusinessObject(element, bo, { 28 | 'activiti:isStartableInTasklist': !!values.isStartableInTasklist 29 | }); 30 | } 31 | 32 | }); 33 | 34 | return [ 35 | isStartableInTasklistEntry 36 | ]; 37 | }; 38 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/bpmn/BpmnPropertiesProvider.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var inherits = require('inherits'); 5 | 6 | var PropertiesActivator = require('../../PropertiesActivator'); 7 | 8 | var processProps = require('./parts/ProcessProps'), 9 | eventProps = require('./parts/EventProps'), 10 | linkProps = require('./parts/LinkProps'), 11 | documentationProps = require('./parts/DocumentationProps'), 12 | idProps = require('./parts/IdProps'), 13 | nameProps = require('./parts/NameProps'), 14 | executableProps = require('./parts/ExecutableProps'); 15 | 16 | function createGeneralTabGroups( 17 | element, canvas, bpmnFactory, 18 | elementRegistry, translate) { 19 | 20 | var generalGroup = { 21 | id: 'general', 22 | label: translate('General'), 23 | entries: [] 24 | }; 25 | idProps(generalGroup, element, translate); 26 | nameProps(generalGroup, element, bpmnFactory, canvas, translate); 27 | processProps(generalGroup, element, translate); 28 | executableProps(generalGroup, element, translate); 29 | 30 | var detailsGroup = { 31 | id: 'details', 32 | label: translate('Details'), 33 | entries: [] 34 | }; 35 | linkProps(detailsGroup, element, translate); 36 | eventProps(detailsGroup, element, bpmnFactory, elementRegistry, translate); 37 | 38 | var documentationGroup = { 39 | id: 'documentation', 40 | label: translate('Documentation'), 41 | entries: [] 42 | }; 43 | 44 | documentationProps(documentationGroup, element, bpmnFactory, translate); 45 | 46 | return [ 47 | generalGroup, 48 | detailsGroup, 49 | documentationGroup 50 | ]; 51 | 52 | } 53 | 54 | function BpmnPropertiesProvider( 55 | eventBus, canvas, bpmnFactory, elementRegistry, translate) { 56 | 57 | PropertiesActivator.call(this, eventBus); 58 | 59 | this.getTabs = function(element) { 60 | 61 | var generalTab = { 62 | id: 'general', 63 | label: translate('General'), 64 | groups: createGeneralTabGroups( 65 | element, canvas, bpmnFactory, elementRegistry, translate) 66 | }; 67 | 68 | return [ 69 | generalTab 70 | ]; 71 | }; 72 | } 73 | 74 | BpmnPropertiesProvider.$inject = [ 75 | 'eventBus', 76 | 'canvas', 77 | 'bpmnFactory', 78 | 'elementRegistry', 79 | 'translate' 80 | ]; 81 | 82 | inherits(BpmnPropertiesProvider, PropertiesActivator); 83 | 84 | module.exports = BpmnPropertiesProvider; 85 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/bpmn/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | __init__: [ 'propertiesProvider' ], 3 | propertiesProvider: [ 'type', require('./BpmnPropertiesProvider') ] 4 | }; -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/bpmn/parts/DocumentationProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var entryFactory = require('../../../factory/EntryFactory'), 4 | cmdHelper = require('../../../helper/CmdHelper'); 5 | 6 | var ModelUtil = require('bpmn-js/lib/util/ModelUtil'), 7 | is = ModelUtil.is, 8 | getBusinessObject = ModelUtil.getBusinessObject; 9 | 10 | 11 | module.exports = function(group, element, bpmnFactory, translate) { 12 | 13 | var getValue = function(businessObject) { 14 | return function(element) { 15 | var documentations = businessObject && businessObject.get('documentation'), 16 | text = (documentations && documentations.length > 0) ? documentations[0].text : ''; 17 | 18 | return { documentation: text }; 19 | }; 20 | }; 21 | 22 | var setValue = function(businessObject) { 23 | return function(element, values) { 24 | var newObjectList = []; 25 | 26 | if (typeof values.documentation !== 'undefined' && values.documentation !== '') { 27 | newObjectList.push(bpmnFactory.create('bpmn:Documentation', { 28 | text: values.documentation 29 | })); 30 | } 31 | 32 | return cmdHelper.setList(element, businessObject, 'documentation', newObjectList); 33 | }; 34 | }; 35 | 36 | // Element Documentation 37 | var elementDocuEntry = entryFactory.textBox({ 38 | id: 'documentation', 39 | label: translate('Element Documentation'), 40 | modelProperty: 'documentation' 41 | }); 42 | 43 | elementDocuEntry.set = setValue(getBusinessObject(element)); 44 | 45 | elementDocuEntry.get = getValue(getBusinessObject(element)); 46 | 47 | group.entries.push(elementDocuEntry); 48 | 49 | 50 | var processRef; 51 | 52 | // Process Documentation when having a Collaboration Diagram 53 | if (is(element, 'bpmn:Participant')) { 54 | 55 | processRef = getBusinessObject(element).processRef; 56 | 57 | // do not show for collapsed Pools/Participants 58 | if (processRef) { 59 | var processDocuEntry = entryFactory.textBox({ 60 | id: 'process-documentation', 61 | label: translate('Process Documentation'), 62 | modelProperty: 'documentation' 63 | }); 64 | 65 | processDocuEntry.set = setValue(processRef); 66 | 67 | processDocuEntry.get = getValue(processRef); 68 | 69 | group.entries.push(processDocuEntry); 70 | } 71 | } 72 | 73 | }; 74 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/bpmn/parts/ExecutableProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var is = require('bpmn-js/lib/util/ModelUtil').is, 4 | getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject; 5 | 6 | var entryFactory = require('../../../factory/EntryFactory'); 7 | 8 | var participantHelper = require('../../../helper/ParticipantHelper'); 9 | 10 | module.exports = function(group, element, translate) { 11 | 12 | var bo = getBusinessObject(element); 13 | 14 | if (!bo) { 15 | return; 16 | } 17 | 18 | if (is(element, 'bpmn:Process') || (is(element, 'bpmn:Participant') && bo.get('processRef'))) { 19 | 20 | var executableEntry = entryFactory.checkbox({ 21 | id: 'process-is-executable', 22 | label: translate('Executable'), 23 | modelProperty: 'isExecutable' 24 | }); 25 | 26 | // in participants we have to change the default behavior of set and get 27 | if (is(element, 'bpmn:Participant')) { 28 | executableEntry.get = function(element) { 29 | return participantHelper.getProcessBusinessObject(element, 'isExecutable'); 30 | }; 31 | 32 | executableEntry.set = function(element, values) { 33 | return participantHelper.modifyProcessBusinessObject(element, 'isExecutable', values); 34 | }; 35 | } 36 | 37 | group.entries.push(executableEntry); 38 | } 39 | 40 | }; 41 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/bpmn/parts/IdProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var entryFactory = require('../../../factory/EntryFactory'), 4 | getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject, 5 | utils = require('../../../Utils'), 6 | cmdHelper = require('../../../helper/CmdHelper'); 7 | 8 | module.exports = function(group, element, translate, options) { 9 | 10 | var description = options && options.description; 11 | 12 | // Id 13 | group.entries.push(entryFactory.validationAwareTextField({ 14 | id: 'id', 15 | label: translate('Id'), 16 | description: description && translate(description), 17 | modelProperty: 'id', 18 | getProperty: function(element) { 19 | return getBusinessObject(element).id; 20 | }, 21 | setProperty: function(element, properties) { 22 | 23 | element = element.labelTarget || element; 24 | 25 | return cmdHelper.updateProperties(element, properties); 26 | }, 27 | validate: function(element, values) { 28 | var idValue = values.id; 29 | 30 | var bo = getBusinessObject(element); 31 | 32 | var idError = utils.isIdValid(bo, idValue, translate); 33 | 34 | return idError ? { id: idError } : {}; 35 | } 36 | })); 37 | 38 | }; 39 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/bpmn/parts/LinkProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var is = require('bpmn-js/lib/util/ModelUtil').is, 4 | getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject, 5 | entryFactory = require('../../../factory/EntryFactory'), 6 | cmdHelper = require('../../../helper/CmdHelper'); 7 | 8 | var forEach = require('lodash/forEach'); 9 | 10 | function getLinkEventDefinition(element) { 11 | 12 | var bo = getBusinessObject(element); 13 | 14 | var linkEventDefinition = null; 15 | if (bo.eventDefinitions) { 16 | forEach(bo.eventDefinitions, function(eventDefinition) { 17 | if (is(eventDefinition, 'bpmn:LinkEventDefinition')) { 18 | linkEventDefinition = eventDefinition; 19 | } 20 | }); 21 | } 22 | 23 | return linkEventDefinition; 24 | } 25 | 26 | module.exports = function(group, element, translate) { 27 | var linkEvents = [ 'bpmn:IntermediateThrowEvent', 'bpmn:IntermediateCatchEvent' ]; 28 | 29 | forEach(linkEvents, function(event) { 30 | if (is(element, event)) { 31 | 32 | var linkEventDefinition = getLinkEventDefinition(element); 33 | 34 | if (linkEventDefinition) { 35 | var entry = entryFactory.textField({ 36 | id: 'link-event', 37 | label: translate('Link Name'), 38 | modelProperty: 'link-name' 39 | }); 40 | 41 | entry.get = function() { 42 | return { 'link-name': linkEventDefinition.get('name') }; 43 | }; 44 | 45 | entry.set = function(element, values) { 46 | var newProperties = { 47 | name: values['link-name'] 48 | }; 49 | return cmdHelper.updateBusinessObject(element, linkEventDefinition, newProperties); 50 | }; 51 | 52 | group.entries.push(entry); 53 | } 54 | } 55 | }); 56 | }; 57 | 58 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/bpmn/parts/NameProps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var nameEntryFactory = require('./implementation/Name'), 4 | createCategoryValue = require('../../../helper/CategoryHelper').createCategoryValue, 5 | is = require('bpmn-js/lib/util/ModelUtil').is, 6 | getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject; 7 | 8 | module.exports = function(group, element, bpmnFactory, canvas, translate) { 9 | 10 | function initializeCategory(semantic) { 11 | var rootElement = canvas.getRootElement(), 12 | definitions = getBusinessObject(rootElement).$parent, 13 | categoryValue = createCategoryValue(definitions, bpmnFactory); 14 | 15 | semantic.categoryValueRef = categoryValue; 16 | 17 | } 18 | 19 | function setGroupName(element, values) { 20 | var bo = getBusinessObject(element), 21 | categoryValueRef = bo.categoryValueRef; 22 | 23 | if (!categoryValueRef) { 24 | initializeCategory(bo); 25 | } 26 | 27 | // needs direct call to update categoryValue properly 28 | return { 29 | cmd: 'element.updateLabel', 30 | context: { 31 | element: element, 32 | newLabel: values.categoryValue 33 | } 34 | }; 35 | } 36 | 37 | function getGroupName(element) { 38 | var bo = getBusinessObject(element), 39 | value = (bo.categoryValueRef || {}).value; 40 | 41 | return { categoryValue: value }; 42 | } 43 | 44 | if (!is(element, 'bpmn:Collaboration')) { 45 | 46 | var options; 47 | if (is(element, 'bpmn:TextAnnotation')) { 48 | options = { modelProperty: 'text', label: translate('Text') }; 49 | } else if (is(element, 'bpmn:Group')) { 50 | options = { 51 | modelProperty: 'categoryValue', 52 | label: translate('Category Value'), 53 | get: getGroupName, 54 | set: setGroupName 55 | }; 56 | } 57 | 58 | // name 59 | group.entries = group.entries.concat(nameEntryFactory(element, options, translate)); 60 | 61 | } 62 | 63 | }; 64 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/bpmn/parts/implementation/ConditionalEventDefinition.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var entryFactory = require('../../../../factory/EntryFactory'), 4 | cmdHelper = require('../../../../helper/CmdHelper'); 5 | 6 | var is = require('bpmn-js/lib/util/ModelUtil').is, 7 | isEventSubProcess = require('bpmn-js/lib/util/DiUtil').isEventSubProcess; 8 | 9 | module.exports = function(group, element, bpmnFactory, conditionalEventDefinition, elementRegistry, translate) { 10 | 11 | var getValue = function(modelProperty) { 12 | return function(element) { 13 | var modelPropertyValue = conditionalEventDefinition.get('camunda:' + modelProperty); 14 | var value = {}; 15 | 16 | value[modelProperty] = modelPropertyValue; 17 | return value; 18 | }; 19 | }; 20 | 21 | var setValue = function(modelProperty) { 22 | return function(element, values) { 23 | var props = {}; 24 | 25 | props['camunda:' + modelProperty] = values[modelProperty] || undefined; 26 | 27 | return cmdHelper.updateBusinessObject(element, conditionalEventDefinition, props); 28 | }; 29 | }; 30 | 31 | group.entries.push(entryFactory.textField({ 32 | id: 'variableName', 33 | label: translate('Variable Name'), 34 | modelProperty : 'variableName', 35 | 36 | get: getValue('variableName'), 37 | set: setValue('variableName') 38 | })); 39 | 40 | var isConditionalStartEvent = 41 | is(element, 'bpmn:StartEvent') && !isEventSubProcess(element.parent); 42 | 43 | if (!isConditionalStartEvent) { 44 | group.entries.push(entryFactory.textField({ 45 | id: 'variableEvent', 46 | label: translate('Variable Event'), 47 | description: translate('Specify more than one variable change event as a comma separated list.'), 48 | modelProperty : 'variableEvent', 49 | 50 | get: getValue('variableEvent'), 51 | set: setValue('variableEvent') 52 | })); 53 | } 54 | }; 55 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/bpmn/parts/implementation/ErrorEventDefinition.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var eventDefinitionReference = require('./EventDefinitionReference'), 4 | elementReferenceProperty = require('./ElementReferenceProperty'); 5 | 6 | 7 | module.exports = function(group, element, bpmnFactory, errorEventDefinition, translate) { 8 | 9 | 10 | group.entries = group.entries.concat(eventDefinitionReference(element, errorEventDefinition, bpmnFactory, { 11 | label: translate('Error'), 12 | elementName: 'error', 13 | elementType: 'bpmn:Error', 14 | referenceProperty: 'errorRef', 15 | newElementIdPrefix: 'Error_' 16 | })); 17 | 18 | 19 | group.entries = group.entries.concat(elementReferenceProperty(element, errorEventDefinition, bpmnFactory, { 20 | id: 'error-element-name', 21 | label: translate('Error Name'), 22 | referenceProperty: 'errorRef', 23 | modelProperty: 'name', 24 | shouldValidate: true 25 | })); 26 | 27 | 28 | group.entries = group.entries.concat(elementReferenceProperty(element, errorEventDefinition, bpmnFactory, { 29 | id: 'error-element-code', 30 | label: translate('Error Code'), 31 | referenceProperty: 'errorRef', 32 | modelProperty: 'errorCode' 33 | })); 34 | 35 | }; 36 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/bpmn/parts/implementation/EscalationEventDefinition.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var entryFactory = require('../../../../factory/EntryFactory'), 4 | cmdHelper = require('../../../../helper/CmdHelper'); 5 | 6 | var eventDefinitionReference = require('./EventDefinitionReference'), 7 | elementReferenceProperty = require('./ElementReferenceProperty'); 8 | 9 | 10 | module.exports = function(group, element, bpmnFactory, escalationEventDefinition, showEscalationCodeVariable, translate) { 11 | 12 | group.entries = group.entries.concat(eventDefinitionReference(element, escalationEventDefinition, bpmnFactory, { 13 | label: translate('Escalation'), 14 | elementName: 'escalation', 15 | elementType: 'bpmn:Escalation', 16 | referenceProperty: 'escalationRef', 17 | newElementIdPrefix: 'Escalation_' 18 | })); 19 | 20 | 21 | group.entries = group.entries.concat(elementReferenceProperty(element, escalationEventDefinition, bpmnFactory, { 22 | id: 'escalation-element-name', 23 | label: translate('Escalation Name'), 24 | referenceProperty: 'escalationRef', 25 | modelProperty: 'name', 26 | shouldValidate: true 27 | })); 28 | 29 | 30 | group.entries = group.entries.concat(elementReferenceProperty(element, escalationEventDefinition, bpmnFactory, { 31 | id: 'escalation-element-code', 32 | label: translate('Escalation Code'), 33 | referenceProperty: 'escalationRef', 34 | modelProperty: 'escalationCode' 35 | })); 36 | 37 | 38 | if (showEscalationCodeVariable) { 39 | group.entries.push(entryFactory.textField({ 40 | id : 'escalationCodeVariable', 41 | label : translate('Escalation Code Variable'), 42 | modelProperty : 'escalationCodeVariable', 43 | 44 | get: function(element) { 45 | var codeVariable = escalationEventDefinition.get('camunda:escalationCodeVariable'); 46 | return { 47 | escalationCodeVariable: codeVariable 48 | }; 49 | }, 50 | 51 | set: function(element, values) { 52 | return cmdHelper.updateBusinessObject(element, escalationEventDefinition, { 53 | 'camunda:escalationCodeVariable': values.escalationCodeVariable || undefined 54 | }); 55 | } 56 | })); 57 | } 58 | }; 59 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/bpmn/parts/implementation/MessageEventDefinition.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var eventDefinitionReference = require('./EventDefinitionReference'), 4 | elementReferenceProperty = require('./ElementReferenceProperty'); 5 | 6 | 7 | module.exports = function(group, element, bpmnFactory, messageEventDefinition, translate) { 8 | 9 | group.entries = group.entries.concat(eventDefinitionReference(element, messageEventDefinition, bpmnFactory, { 10 | label: translate('Message'), 11 | elementName: 'message', 12 | elementType: 'bpmn:Message', 13 | referenceProperty: 'messageRef', 14 | newElementIdPrefix: 'Message_' 15 | })); 16 | 17 | 18 | group.entries = group.entries.concat(elementReferenceProperty(element, messageEventDefinition, bpmnFactory, { 19 | id: 'message-element-name', 20 | label: translate('Message Name'), 21 | referenceProperty: 'messageRef', 22 | modelProperty: 'name', 23 | shouldValidate: true 24 | })); 25 | 26 | }; 27 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/bpmn/parts/implementation/Name.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var entryFactory = require('../../../../factory/EntryFactory'); 4 | 5 | /** 6 | * Create an entry to modify the name of an an element. 7 | * 8 | * @param {djs.model.Base} element 9 | * @param {Object} options 10 | * @param {string} options.id the id of the entry 11 | * @param {string} options.label the label of the entry 12 | * 13 | * @return {Array} return an array containing 14 | * the entry to modify the name 15 | */ 16 | module.exports = function(element, options, translate) { 17 | 18 | options = options || {}; 19 | var id = options.id || 'name', 20 | label = options.label || translate('Name'), 21 | modelProperty = options.modelProperty || 'name'; 22 | 23 | var nameEntry = entryFactory.textBox({ 24 | id: id, 25 | label: label, 26 | modelProperty: modelProperty, 27 | get: options.get, 28 | set: options.set 29 | }); 30 | 31 | return [ nameEntry ]; 32 | 33 | }; 34 | -------------------------------------------------------------------------------- /src/main/resources/resources/bpmnjs/resources/properties-panel/provider/bpmn/parts/implementation/SignalEventDefinition.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var eventDefinitionReference = require('./EventDefinitionReference'), 4 | elementReferenceProperty = require('./ElementReferenceProperty'); 5 | 6 | 7 | module.exports = function(group, element, bpmnFactory, signalEventDefinition, translate) { 8 | 9 | group.entries = group.entries.concat(eventDefinitionReference(element, signalEventDefinition, bpmnFactory, { 10 | label: translate('Signal'), 11 | elementName: 'signal', 12 | elementType: 'bpmn:Signal', 13 | referenceProperty: 'signalRef', 14 | newElementIdPrefix: 'Signal_' 15 | })); 16 | 17 | 18 | group.entries = group.entries.concat(elementReferenceProperty(element, signalEventDefinition, bpmnFactory, { 19 | id: 'signal-element-name', 20 | label: translate('Signal Name'), 21 | referenceProperty: 'signalRef', 22 | modelProperty: 'name', 23 | shouldValidate: true 24 | })); 25 | 26 | }; 27 | -------------------------------------------------------------------------------- /src/main/resources/resources/demo-login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 登录 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 |
14 | 15 | 16 | -------------------------------------------------------------------------------- /src/main/resources/resources/demo-login1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 登录 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 |
14 | 15 | 16 | -------------------------------------------------------------------------------- /src/main/resources/resources/failure.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 失败 9 | 10 | -------------------------------------------------------------------------------- /src/main/resources/resources/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 首页 9 | 10 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/.gitattributes: -------------------------------------------------------------------------------- 1 | *.js linguist-language=JavaScript 2 | 3 | *.css linguist-language=JavaScript 4 | 5 | *.html linguist-language=JavaScript 6 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/.gitignore: -------------------------------------------------------------------------------- 1 | /.idea -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 layuimini 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/api/clear.json: -------------------------------------------------------------------------------- 1 | { 2 | "code": 1, 3 | "msg": "服务端清理缓存成功" 4 | } -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/api/init.json: -------------------------------------------------------------------------------- 1 | { 2 | "homeInfo": { 3 | "title": "首页", 4 | "href": "page/welcome-2.html?t=1" 5 | }, 6 | "logoInfo": { 7 | "title": "工作流", 8 | "image": "images/logo.png", 9 | "href": "" 10 | }, 11 | "menuInfo": [ 12 | { 13 | "title": "流程管理", 14 | "icon": "fa fa-slideshare", 15 | "href": "", 16 | "target": "_self", 17 | "child": [ 18 | { 19 | "title": "首页", 20 | "href": "page/welcome-2.html", 21 | "icon": "fa fa-tachometer", 22 | "target": "_self" 23 | }, 24 | { 25 | "title": "流程部署列表", 26 | "href": "page/ProcessDefinition.html", 27 | "icon": "fa fa-calendar", 28 | "target": "_self" 29 | }, 30 | { 31 | "title": "流程实例列表", 32 | "href": "page/ProcessInstance.html", 33 | "icon": "fa fa-calendar", 34 | "target": "_self" 35 | }, 36 | { 37 | "title": "待办任务", 38 | "href": "page/ToDoTasks.html", 39 | "icon": "fa fa-snowflake-o", 40 | "target": "_self" 41 | }, 42 | { 43 | "title": "历史任务", 44 | "href": "page/HistoryTasks.html", 45 | "icon": "fa fa-snowflake-o", 46 | "target": "_self" 47 | } 48 | ] 49 | } 50 | ] 51 | } -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/api/tableSelect.json: -------------------------------------------------------------------------------- 1 | { 2 | "code": 0, 3 | "msg": "", 4 | "count": 16, 5 | "data": [ 6 | { "id":"001", "username":"张玉林", "sex":"女" }, 7 | { "id":"002", "username":"刘晓军", "sex":"男" }, 8 | { "id":"003", "username":"张恒", "sex":"男" }, 9 | { "id":"004", "username":"朱一", "sex":"男" }, 10 | { "id":"005", "username":"刘佳能", "sex":"女" }, 11 | { "id":"006", "username":"晓梅", "sex":"女" }, 12 | { "id":"007", "username":"马冬梅", "sex":"女" }, 13 | { "id":"008", "username":"刘晓庆", "sex":"女" }, 14 | { "id":"009", "username":"刘晓庆", "sex":"女" }, 15 | { "id":"010", "username":"刘晓庆", "sex":"女" }, 16 | { "id":"011", "username":"刘晓庆", "sex":"女" }, 17 | { "id":"012", "username":"刘晓庆", "sex":"女" }, 18 | { "id":"013", "username":"刘晓庆", "sex":"女" }, 19 | { "id":"014", "username":"刘晓庆", "sex":"女" }, 20 | { "id":"015", "username":"刘晓庆", "sex":"女" }, 21 | { "id":"016", "username":"刘晓庆", "sex":"女" } 22 | ] 23 | } -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/api/upload.json: -------------------------------------------------------------------------------- 1 | { 2 | "code": 1, 3 | "msg": "上传成功", 4 | "data": { 5 | "url": [ 6 | "../images/logo.png", 7 | "../images/captcha.jpg" 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/images/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/images/bg.jpg -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/images/captcha.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/images/captcha.jpg -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/images/favicon.ico -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/images/logo.png -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/js/lay-config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * date:2019/08/16 3 | * author:Mr.Chung 4 | * description:此处放layui自定义扩展 5 | * version:2.0.4 6 | */ 7 | 8 | //获取地址 9 | var proHost = window.location.protocol + "//" + window.location.host; 10 | var href = window.location.href.split("layuimini")[0]; 11 | var key = href.split(window.location.host)[1]; 12 | var publicurl = proHost + key; 13 | var userName = localStorage.getItem("userName"); 14 | // console.log(publicurl,userName,"111"); 15 | window.rootPath = (function (src) { 16 | src = document.scripts[document.scripts.length - 1].src; 17 | return src.substring(0, src.lastIndexOf("/") + 1); 18 | })(); 19 | layui.config({ 20 | base: rootPath + "lay-module/", 21 | version: true 22 | }).extend({ 23 | miniAdmin: "layuimini/miniAdmin", // layuimini后台扩展 24 | miniMenu: "layuimini/miniMenu", // layuimini菜单扩展 25 | miniTab: "layuimini/miniTab", // layuimini tab扩展 26 | miniTheme: "layuimini/miniTheme", // layuimini 主题扩展 27 | miniTongji: "layuimini/miniTongji", // layuimini 统计扩展 28 | step: 'step-lay/step', // 分步表单扩展 29 | treetable: 'treetable-lay/treetable', //table树形扩展 30 | tableSelect: 'tableSelect/tableSelect', // table选择扩展 31 | iconPickerFa: 'iconPicker/iconPickerFa', // fa图标选择扩展 32 | echarts: 'echarts/echarts', // echarts图表扩展 33 | echartsTheme: 'echarts/echartsTheme', // echarts图表主题扩展 34 | wangEditor: 'wangEditor/wangEditor', // wangEditor富文本扩展 35 | layarea: 'layarea/layarea', // 省市县区三级联动下拉选择器 36 | admin: 'layuiadmin/admin',//admin 37 | }); 38 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/js/lay-module/layuimini/miniTongji.js: -------------------------------------------------------------------------------- 1 | /** 2 | * date:2020/03/01 3 | * author:Mr.Chung 4 | * version:2.0 5 | * description:layuimini 统计框架扩展 6 | */ 7 | layui.define(["jquery"], function (exports) { 8 | var $ = layui.$; 9 | 10 | var miniTongji = { 11 | 12 | /** 13 | * 初始化 14 | * @param options 15 | */ 16 | render: function (options) { 17 | options.specific = options.specific || false; 18 | options.domains = options.domains || []; 19 | var domain = window.location.hostname; 20 | if (options.specific === false || (options.specific === true && options.domains.indexOf(domain) >=0)) { 21 | miniTongji.listen(); 22 | } 23 | }, 24 | 25 | /** 26 | * 监听统计代码 27 | */ 28 | listen: function () { 29 | var _hmt = _hmt || []; 30 | (function () { 31 | var hm = document.createElement("script"); 32 | hm.src = "https://hm.baidu.com/hm.js?d97abf6d61c21d773f97835defbdef4e"; 33 | var s = document.getElementsByTagName("script")[0]; 34 | s.parentNode.insertBefore(hm, s); 35 | })(); 36 | } 37 | }; 38 | 39 | exports("miniTongji", miniTongji); 40 | }); -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/js/lay-module/step-lay/step.css: -------------------------------------------------------------------------------- 1 | .lay-step { 2 | font-size: 0; 3 | width: 400px; 4 | margin: 0 auto; 5 | max-width: 100%; 6 | padding-left: 200px; 7 | } 8 | 9 | .step-item { 10 | display: inline-block; 11 | line-height: 26px; 12 | position: relative; 13 | font-size: 14px; 14 | } 15 | 16 | .step-item-tail { 17 | width: 100%; 18 | padding: 0 10px; 19 | position: absolute; 20 | left: 0; 21 | top: 13px; 22 | } 23 | 24 | .step-item-tail i { 25 | display: inline-block; 26 | width: 100%; 27 | height: 1px; 28 | vertical-align: top; 29 | background: #c2c2c2; 30 | position: relative; 31 | } 32 | 33 | .step-item-tail .step-item-tail-done { 34 | background: #009688; 35 | } 36 | 37 | .step-item-head { 38 | position: relative; 39 | display: inline-block; 40 | height: 26px; 41 | width: 26px; 42 | text-align: center; 43 | vertical-align: top; 44 | color: #009688; 45 | border: 1px solid #009688; 46 | border-radius: 50%; 47 | background: #ffffff; 48 | } 49 | 50 | .step-item-head.step-item-head-active { 51 | background: #009688; 52 | color: #ffffff; 53 | } 54 | 55 | .step-item-main { 56 | display: block; 57 | position: relative; 58 | margin-left: -50%; 59 | margin-right: 50%; 60 | padding-left: 26px; 61 | text-align: center; 62 | } 63 | 64 | .step-item-main-title { 65 | font-weight: bolder; 66 | color: #555555; 67 | } 68 | 69 | .step-item-main-desc { 70 | color: #aaaaaa; 71 | } 72 | 73 | .lay-step + [carousel-item]:before { 74 | display: none; 75 | } 76 | 77 | .lay-step + [carousel-item] > * { 78 | background-color: transparent; 79 | } -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/js/lay-module/treetable-lay/treetable.css: -------------------------------------------------------------------------------- 1 | .treeTable-empty { 2 | width: 20px; 3 | display: inline-block; 4 | } 5 | 6 | .treeTable-icon { 7 | cursor: pointer; 8 | } 9 | 10 | .treeTable-icon .layui-icon-triangle-d:before { 11 | content: "\e623"; 12 | } 13 | 14 | .treeTable-icon.open .layui-icon-triangle-d:before { 15 | content: "\e625"; 16 | background-color: transparent; 17 | } 18 | 19 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/js/lay-module/wangEditor/fonts/w-e-icon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/js/lay-module/wangEditor/fonts/w-e-icon.woff -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/HELP-US-OUT.txt: -------------------------------------------------------------------------------- 1 | I hope you love Font Awesome. If you've found it useful, please do me a favor and check out my latest project, 2 | Fort Awesome (https://fortawesome.com). It makes it easy to put the perfect icons on your website. Choose from our awesome, 3 | comprehensive icon sets or copy and paste your own. 4 | 5 | Please. Check it out. 6 | 7 | -Dave Gandy 8 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/less/animated.less: -------------------------------------------------------------------------------- 1 | // Animated Icons 2 | // -------------------------- 3 | 4 | .@{fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .@{fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/less/bordered-pulled.less: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em @fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .@{fa-css-prefix}-pull-left { float: left; } 11 | .@{fa-css-prefix}-pull-right { float: right; } 12 | 13 | .@{fa-css-prefix} { 14 | &.@{fa-css-prefix}-pull-left { margin-right: .3em; } 15 | &.@{fa-css-prefix}-pull-right { margin-left: .3em; } 16 | } 17 | 18 | /* Deprecated as of 4.4.0 */ 19 | .pull-right { float: right; } 20 | .pull-left { float: left; } 21 | 22 | .@{fa-css-prefix} { 23 | &.pull-left { margin-right: .3em; } 24 | &.pull-right { margin-left: .3em; } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/less/core.less: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/less/fixed-width.less: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .@{fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/less/font-awesome.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables.less"; 7 | @import "mixins.less"; 8 | @import "path.less"; 9 | @import "core.less"; 10 | @import "larger.less"; 11 | @import "fixed-width.less"; 12 | @import "list.less"; 13 | @import "bordered-pulled.less"; 14 | @import "animated.less"; 15 | @import "rotated-flipped.less"; 16 | @import "stacked.less"; 17 | @import "icons.less"; 18 | @import "screen-reader.less"; 19 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/less/larger.less: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .@{fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .@{fa-css-prefix}-2x { font-size: 2em; } 11 | .@{fa-css-prefix}-3x { font-size: 3em; } 12 | .@{fa-css-prefix}-4x { font-size: 4em; } 13 | .@{fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/less/list.less: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: @fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .@{fa-css-prefix}-li { 11 | position: absolute; 12 | left: -@fa-li-width; 13 | width: @fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.@{fa-css-prefix}-lg { 17 | left: (-@fa-li-width + (4em / 14)); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/less/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | .fa-icon() { 5 | display: inline-block; 6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | 14 | .fa-icon-rotate(@degrees, @rotation) { 15 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation})"; 16 | -webkit-transform: rotate(@degrees); 17 | -ms-transform: rotate(@degrees); 18 | transform: rotate(@degrees); 19 | } 20 | 21 | .fa-icon-flip(@horiz, @vert, @rotation) { 22 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation}, mirror=1)"; 23 | -webkit-transform: scale(@horiz, @vert); 24 | -ms-transform: scale(@horiz, @vert); 25 | transform: scale(@horiz, @vert); 26 | } 27 | 28 | 29 | // Only display content to screen readers. A la Bootstrap 4. 30 | // 31 | // See: http://a11yproject.com/posts/how-to-hide-content/ 32 | 33 | .sr-only() { 34 | position: absolute; 35 | width: 1px; 36 | height: 1px; 37 | padding: 0; 38 | margin: -1px; 39 | overflow: hidden; 40 | clip: rect(0,0,0,0); 41 | border: 0; 42 | } 43 | 44 | // Use in conjunction with .sr-only to only display content when it's focused. 45 | // 46 | // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 47 | // 48 | // Credit: HTML5 Boilerplate 49 | 50 | .sr-only-focusable() { 51 | &:active, 52 | &:focus { 53 | position: static; 54 | width: auto; 55 | height: auto; 56 | margin: 0; 57 | overflow: visible; 58 | clip: auto; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/less/path.less: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}'); 7 | src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'), 8 | url('@{fa-font-path}/fontawesome-webfont.woff2?v=@{fa-version}') format('woff2'), 9 | url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'), 10 | url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'), 11 | url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/less/rotated-flipped.less: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } 5 | .@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } 6 | .@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } 7 | 8 | .@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } 9 | .@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .@{fa-css-prefix}-rotate-90, 15 | :root .@{fa-css-prefix}-rotate-180, 16 | :root .@{fa-css-prefix}-rotate-270, 17 | :root .@{fa-css-prefix}-flip-horizontal, 18 | :root .@{fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/less/screen-reader.less: -------------------------------------------------------------------------------- 1 | // Screen Readers 2 | // ------------------------- 3 | 4 | .sr-only { .sr-only(); } 5 | .sr-only-focusable { .sr-only-focusable(); } 6 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/less/stacked.less: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .@{fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .@{fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .@{fa-css-prefix}-inverse { color: @fa-inverse; } 21 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/scss/_animated.scss: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .#{$fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .#{$fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/scss/_bordered-pulled.scss: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em $fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .#{$fa-css-prefix}-pull-left { float: left; } 11 | .#{$fa-css-prefix}-pull-right { float: right; } 12 | 13 | .#{$fa-css-prefix} { 14 | &.#{$fa-css-prefix}-pull-left { margin-right: .3em; } 15 | &.#{$fa-css-prefix}-pull-right { margin-left: .3em; } 16 | } 17 | 18 | /* Deprecated as of 4.4.0 */ 19 | .pull-right { float: right; } 20 | .pull-left { float: left; } 21 | 22 | .#{$fa-css-prefix} { 23 | &.pull-left { margin-right: .3em; } 24 | &.pull-right { margin-left: .3em; } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/scss/_core.scss: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/scss/_fixed-width.scss: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .#{$fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/scss/_larger.scss: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .#{$fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .#{$fa-css-prefix}-2x { font-size: 2em; } 11 | .#{$fa-css-prefix}-3x { font-size: 3em; } 12 | .#{$fa-css-prefix}-4x { font-size: 4em; } 13 | .#{$fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/scss/_list.scss: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: $fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .#{$fa-css-prefix}-li { 11 | position: absolute; 12 | left: -$fa-li-width; 13 | width: $fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.#{$fa-css-prefix}-lg { 17 | left: -$fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | @mixin fa-icon() { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | 14 | @mixin fa-icon-rotate($degrees, $rotation) { 15 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation})"; 16 | -webkit-transform: rotate($degrees); 17 | -ms-transform: rotate($degrees); 18 | transform: rotate($degrees); 19 | } 20 | 21 | @mixin fa-icon-flip($horiz, $vert, $rotation) { 22 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}, mirror=1)"; 23 | -webkit-transform: scale($horiz, $vert); 24 | -ms-transform: scale($horiz, $vert); 25 | transform: scale($horiz, $vert); 26 | } 27 | 28 | 29 | // Only display content to screen readers. A la Bootstrap 4. 30 | // 31 | // See: http://a11yproject.com/posts/how-to-hide-content/ 32 | 33 | @mixin sr-only { 34 | position: absolute; 35 | width: 1px; 36 | height: 1px; 37 | padding: 0; 38 | margin: -1px; 39 | overflow: hidden; 40 | clip: rect(0,0,0,0); 41 | border: 0; 42 | } 43 | 44 | // Use in conjunction with .sr-only to only display content when it's focused. 45 | // 46 | // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 47 | // 48 | // Credit: HTML5 Boilerplate 49 | 50 | @mixin sr-only-focusable { 51 | &:active, 52 | &:focus { 53 | position: static; 54 | width: auto; 55 | height: auto; 56 | margin: 0; 57 | overflow: visible; 58 | clip: auto; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/scss/_path.scss: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}'); 7 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'), 8 | url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'), 9 | url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'), 10 | url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'), 11 | url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/scss/_rotated-flipped.scss: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); } 5 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); } 6 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); } 7 | 8 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); } 9 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .#{$fa-css-prefix}-rotate-90, 15 | :root .#{$fa-css-prefix}-rotate-180, 16 | :root .#{$fa-css-prefix}-rotate-270, 17 | :root .#{$fa-css-prefix}-flip-horizontal, 18 | :root .#{$fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/scss/_screen-reader.scss: -------------------------------------------------------------------------------- 1 | // Screen Readers 2 | // ------------------------- 3 | 4 | .sr-only { @include sr-only(); } 5 | .sr-only-focusable { @include sr-only-focusable(); } 6 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/scss/_stacked.scss: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .#{$fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .#{$fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .#{$fa-css-prefix}-inverse { color: $fa-inverse; } 21 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/font-awesome-4.7.0/scss/font-awesome.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables"; 7 | @import "mixins"; 8 | @import "path"; 9 | @import "core"; 10 | @import "larger"; 11 | @import "fixed-width"; 12 | @import "list"; 13 | @import "bordered-pulled"; 14 | @import "animated"; 15 | @import "rotated-flipped"; 16 | @import "stacked"; 17 | @import "icons"; 18 | @import "screen-reader"; 19 | -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/css/modules/code.css: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.5 MIT License By https://www.layui.com */ 2 | html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none} -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/css/modules/layer/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/css/modules/layer/default/icon-ext.png -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/css/modules/layer/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/css/modules/layer/default/icon.png -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/css/modules/layer/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/css/modules/layer/default/loading-0.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/css/modules/layer/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/css/modules/layer/default/loading-1.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/css/modules/layer/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/css/modules/layer/default/loading-2.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/font/iconfont.eot -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/font/iconfont.ttf -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/font/iconfont.woff -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/font/iconfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/font/iconfont.woff2 -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/0.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/1.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/10.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/11.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/12.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/13.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/14.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/15.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/16.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/17.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/18.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/19.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/2.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/20.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/21.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/22.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/23.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/24.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/25.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/26.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/27.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/28.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/29.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/3.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/30.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/31.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/32.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/33.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/34.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/35.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/36.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/37.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/38.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/39.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/39.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/4.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/40.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/40.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/41.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/41.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/42.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/43.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/44.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/44.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/45.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/45.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/46.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/46.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/47.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/48.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/48.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/49.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/49.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/5.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/50.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/51.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/51.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/52.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/52.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/53.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/53.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/54.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/54.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/55.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/55.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/56.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/57.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/58.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/59.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/59.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/6.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/60.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/60.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/61.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/62.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/62.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/63.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/64.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/65.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/66.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/66.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/67.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/67.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/68.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/68.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/69.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/69.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/7.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/70.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/70.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/71.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/71.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/8.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/layuimini/lib/layui-v2.5.5/images/face/9.gif -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/lay/modules/code.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var a=layui.$,l="http://www.layui.com/doc/modules/code.html";e("code",function(e){var t=[];e=e||{},e.elem=a(e.elem||".layui-code"),e.about=!("about"in e)||e.about,e.elem.each(function(){t.push(this)}),layui.each(t.reverse(),function(t,i){var c=a(i),o=c.html();(c.attr("lay-encode")||e.encode)&&(o=o.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('
  1. '+o.replace(/[\r\t\n]+/g,"
  2. ")+"
"),c.find(">.layui-code-h3")[0]||c.prepend('

'+(c.attr("lay-title")||e.title||"code")+(e.about?'layui.code':"")+"

");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss"); -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/lay/modules/flow.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),i||(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;su)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)}); -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/lib/layui-v2.5.5/lay/modules/laytpl.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.5 MIT License By https://www.layui.com */ 2 | ;layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},c={exp:function(e){return new RegExp(e,"g")},query:function(e,c,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return n((c||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)}); -------------------------------------------------------------------------------- /src/main/resources/resources/layuimini/page/color-select.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 颜色选择器 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 |
14 | 颜色选择器使用开源项目:paigusu
15 | TableSelect 16 |
17 | 18 |
19 |
20 | 21 |
22 | 23 | 24 |
25 |
26 |
27 | 28 |
29 |     $(function () {
30 |         $('.paigusu').paigusu({
31 |             color: '#1926dc',//初始色  支持两种配置方案
32 |         }, function (event, obj) {
33 |             console.log(event);
34 |             console.log(obj);
35 |             $(event).css('color', '#' + obj.hex)
36 |         });
37 |     });
38 |         
39 |
40 |
41 | 42 | 43 | 44 | 56 | 57 | -------------------------------------------------------------------------------- /src/main/resources/resources/success.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 成功 9 | 10 | -------------------------------------------------------------------------------- /src/main/resources/resources/uploadfile/1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 123 9 | 10 | -------------------------------------------------------------------------------- /src/main/resources/resources/uploadfile/169e48d6-2438-4bcb-adea-c745733492a2.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/uploadfile/169e48d6-2438-4bcb-adea-c745733492a2.docx -------------------------------------------------------------------------------- /src/main/resources/resources/uploadfile/4d386e74-f96b-4b42-b838-cd755ccfa17a.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/resources/uploadfile/4d386e74-f96b-4b42-b838-cd755ccfa17a.docx -------------------------------------------------------------------------------- /src/main/resources/static/git_show/0001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/static/git_show/0001.jpg -------------------------------------------------------------------------------- /src/main/resources/static/git_show/0002.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/static/git_show/0002.gif -------------------------------------------------------------------------------- /src/main/resources/static/git_show/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/static/git_show/0003.png -------------------------------------------------------------------------------- /src/main/resources/static/git_show/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wwdui/activiti7-workflow/74f1e65d2a359b6d07856ff0f178d11e98b249d0/src/main/resources/static/git_show/0004.png -------------------------------------------------------------------------------- /src/test/java/com/imooc/activitiweb/ActivitiwebApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class ActivitiwebApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/test/java/com/imooc/activitiweb/Part1_Deployment.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb; 2 | 3 | import org.activiti.engine.RepositoryService; 4 | import org.activiti.engine.repository.Deployment; 5 | import org.junit.jupiter.api.Test; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.boot.test.context.SpringBootTest; 8 | 9 | import java.io.InputStream; 10 | import java.util.List; 11 | import java.util.zip.ZipInputStream; 12 | 13 | @SpringBootTest 14 | public class Part1_Deployment { 15 | 16 | @Autowired 17 | private RepositoryService repositoryService; 18 | 19 | //通过bpmn部署流程 20 | @Test 21 | public void initDeploymentBPMN(){ 22 | String filename="BPMN/Part4_Task_claim.bpmn"; 23 | // String pngname="BPMN/Part1_Deployment.png"; 24 | Deployment deployment=repositoryService.createDeployment() 25 | .addClasspathResource(filename) 26 | //.addClasspathResource(pngname)//图片 27 | .name("流程部署测试候选人task") 28 | .deploy(); 29 | System.out.println(deployment.getName()); 30 | } 31 | 32 | //通过ZIP部署流程 33 | @Test 34 | public void initDeploymentZIP() { 35 | InputStream fileInputStream = this.getClass() 36 | .getClassLoader() 37 | .getResourceAsStream("BPMN/Part1_DeploymentV2.zip"); 38 | ZipInputStream zip=new ZipInputStream(fileInputStream); 39 | Deployment deployment=repositoryService.createDeployment() 40 | .addZipInputStream(zip) 41 | .name("流程部署测试zip") 42 | .deploy(); 43 | System.out.println(deployment.getName()); 44 | } 45 | 46 | //查询流程部署 47 | @Test 48 | public void getDeployments() { 49 | List list = repositoryService.createDeploymentQuery().list(); 50 | for(Deployment dep : list){ 51 | System.out.println("Id:"+dep.getId()); 52 | System.out.println("Name:"+dep.getName()); 53 | System.out.println("DeploymentTime:"+dep.getDeploymentTime()); 54 | System.out.println("Key:"+dep.getKey()); 55 | } 56 | 57 | } 58 | 59 | 60 | 61 | } 62 | -------------------------------------------------------------------------------- /src/test/java/com/imooc/activitiweb/Part2_ProcessDefinition.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb; 2 | 3 | import org.activiti.engine.RepositoryService; 4 | import org.activiti.engine.repository.ProcessDefinition; 5 | import org.junit.jupiter.api.Test; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.boot.test.context.SpringBootTest; 8 | 9 | import java.util.List; 10 | 11 | @SpringBootTest 12 | public class Part2_ProcessDefinition { 13 | 14 | @Autowired 15 | private RepositoryService repositoryService; 16 | 17 | //查询流程定义 18 | @Test 19 | public void getDefinitions(){ 20 | List list = repositoryService.createProcessDefinitionQuery() 21 | .list(); 22 | for(ProcessDefinition pd : list){ 23 | System.out.println("------流程定义--------"); 24 | System.out.println("Name:"+pd.getName()); 25 | System.out.println("Key:"+pd.getKey()); 26 | System.out.println("ResourceName:"+pd.getResourceName()); 27 | System.out.println("DeploymentId:"+pd.getDeploymentId()); 28 | System.out.println("Version:"+pd.getVersion()); 29 | 30 | } 31 | 32 | } 33 | 34 | //删除流程定义 35 | @Test 36 | public void delDefinition(){ 37 | 38 | String pdID="44b15cfe-ce3e-11ea-92a3-dcfb4875e032"; 39 | repositoryService.deleteDeployment(pdID,true); 40 | System.out.println("删除流程定义成功"); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/test/java/com/imooc/activitiweb/Part3_ProcessInstance.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb; 2 | 3 | import org.activiti.engine.RuntimeService; 4 | import org.activiti.engine.runtime.ProcessInstance; 5 | import org.junit.jupiter.api.Test; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.boot.test.context.SpringBootTest; 8 | 9 | import java.util.List; 10 | 11 | @SpringBootTest 12 | public class Part3_ProcessInstance { 13 | 14 | @Autowired 15 | private RuntimeService runtimeService; 16 | 17 | //初始化流程实例 18 | @Test 19 | public void initProcessInstance(){ 20 | //1、获取页面表单填报的内容,请假时间,请假事由,String fromData 21 | //2、fromData 写入业务表,返回业务表主键ID==businessKey 22 | //3、把业务数据与Activiti7流程数据关联 23 | ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("myProcess_claim","bKey002"); 24 | System.out.println("流程实例ID:"+processInstance.getProcessDefinitionId()); 25 | 26 | } 27 | 28 | //获取流程实例列表 29 | @Test 30 | public void getProcessInstances(){ 31 | List list = runtimeService.createProcessInstanceQuery().list(); 32 | for(ProcessInstance pi : list){ 33 | System.out.println("--------流程实例------"); 34 | System.out.println("ProcessInstanceId:"+pi.getProcessInstanceId()); 35 | System.out.println("ProcessDefinitionId:"+pi.getProcessDefinitionId()); 36 | System.out.println("isEnded"+pi.isEnded()); 37 | System.out.println("isSuspended:"+pi.isSuspended()); 38 | 39 | } 40 | 41 | } 42 | 43 | 44 | //暂停与激活流程实例 45 | @Test 46 | public void activitieProcessInstance(){ 47 | // runtimeService.suspendProcessInstanceById("73f0fb9a-ce5b-11ea-bf67-dcfb4875e032"); 48 | //System.out.println("挂起流程实例"); 49 | 50 | runtimeService.activateProcessInstanceById("73f0fb9a-ce5b-11ea-bf67-dcfb4875e032"); 51 | System.out.println("激活流程实例"); 52 | } 53 | 54 | //删除流程实例 55 | @Test 56 | public void delProcessInstance(){ 57 | runtimeService.deleteProcessInstance("73f0fb9a-ce5b-11ea-bf67-dcfb4875e032","删着玩"); 58 | System.out.println("删除流程实例"); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/test/java/com/imooc/activitiweb/Part4_Task.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb; 2 | 3 | import org.activiti.engine.TaskService; 4 | import org.activiti.engine.task.Task; 5 | import org.junit.jupiter.api.Test; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.boot.test.context.SpringBootTest; 8 | 9 | import java.util.List; 10 | 11 | @SpringBootTest 12 | public class Part4_Task { 13 | 14 | @Autowired 15 | private TaskService taskService; 16 | 17 | //任务查询 18 | @Test 19 | public void getTasks(){ 20 | List list = taskService.createTaskQuery().list(); 21 | for(Task tk : list){ 22 | System.out.println("Id:"+tk.getId()); 23 | System.out.println("Name:"+tk.getName()); 24 | System.out.println("Assignee:"+tk.getAssignee()); 25 | } 26 | } 27 | 28 | //查询我的代办任务 29 | @Test 30 | public void getTasksByAssignee(){ 31 | List list = taskService.createTaskQuery() 32 | .taskAssignee("bajie") 33 | .list(); 34 | for(Task tk : list){ 35 | System.out.println("Id:"+tk.getId()); 36 | System.out.println("Name:"+tk.getName()); 37 | System.out.println("Assignee:"+tk.getAssignee()); 38 | } 39 | 40 | } 41 | 42 | //执行任务 43 | @Test 44 | public void completeTask(){ 45 | taskService.complete("d07d6026-cef8-11ea-a5f7-dcfb4875e032"); 46 | System.out.println("完成任务"); 47 | 48 | } 49 | 50 | //拾取任务 51 | @Test 52 | public void claimTask(){ 53 | Task task = taskService.createTaskQuery().taskId("1f2a8edf-cefa-11ea-84aa-dcfb4875e032").singleResult(); 54 | taskService.claim("1f2a8edf-cefa-11ea-84aa-dcfb4875e032","bajie"); 55 | } 56 | 57 | //归还与交办任务 58 | @Test 59 | public void setTaskAssignee(){ 60 | Task task = taskService.createTaskQuery().taskId("1f2a8edf-cefa-11ea-84aa-dcfb4875e032").singleResult(); 61 | taskService.setAssignee("1f2a8edf-cefa-11ea-84aa-dcfb4875e032","null");//归还候选任务 62 | taskService.setAssignee("1f2a8edf-cefa-11ea-84aa-dcfb4875e032","wukong");//交办 63 | } 64 | 65 | 66 | 67 | } 68 | -------------------------------------------------------------------------------- /src/test/java/com/imooc/activitiweb/Part5_HistoricTaskInstance.java: -------------------------------------------------------------------------------- 1 | package com.imooc.activitiweb; 2 | 3 | import org.activiti.engine.HistoryService; 4 | import org.activiti.engine.history.HistoricTaskInstance; 5 | import org.junit.jupiter.api.Test; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.boot.test.context.SpringBootTest; 8 | 9 | import java.util.List; 10 | 11 | @SpringBootTest 12 | public class Part5_HistoricTaskInstance { 13 | @Autowired 14 | private HistoryService historyService; 15 | 16 | //根据用户名查询历史记录 17 | @Test 18 | public void HistoricTaskInstanceByUser(){ 19 | List list = historyService 20 | .createHistoricTaskInstanceQuery() 21 | .orderByHistoricTaskInstanceEndTime().asc() 22 | .taskAssignee("bajie") 23 | .list(); 24 | for(HistoricTaskInstance hi : list){ 25 | System.out.println("Id:"+ hi.getId()); 26 | System.out.println("ProcessInstanceId:"+ hi.getProcessInstanceId()); 27 | System.out.println("Name:"+ hi.getName()); 28 | 29 | } 30 | 31 | } 32 | 33 | 34 | //根据流程实例ID查询历史 35 | @Test 36 | public void HistoricTaskInstanceByPiID(){ 37 | List list = historyService 38 | .createHistoricTaskInstanceQuery() 39 | .orderByHistoricTaskInstanceEndTime().asc() 40 | .processInstanceId("1f2314cb-cefa-11ea-84aa-dcfb4875e032") 41 | .list(); 42 | for(HistoricTaskInstance hi : list){ 43 | System.out.println("Id:"+ hi.getId()); 44 | System.out.println("ProcessInstanceId:"+ hi.getProcessInstanceId()); 45 | System.out.println("Name:"+ hi.getName()); 46 | 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /user.sql: -------------------------------------------------------------------------------- 1 | SET FOREIGN_KEY_CHECKS=0; 2 | 3 | -- ---------------------------- 4 | -- 创建用户表 5 | -- ---------------------------- 6 | DROP TABLE IF EXISTS `user`; 7 | CREATE TABLE `user` ( 8 | `id` bigint(20) NOT NULL AUTO_INCREMENT, 9 | `name` varchar(32) DEFAULT NULL COMMENT '姓名', 10 | `address` varchar(64) DEFAULT NULL COMMENT '联系地址', 11 | `username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '账号', 12 | `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '密码', 13 | `roles` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '角色', 14 | PRIMARY KEY (`id`) 15 | ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; 16 | 17 | -- ---------------------------- 18 | -- 填充用户表 19 | -- ---------------------------- 20 | INSERT INTO `user` VALUES ('1', 'admincn', 'beijing', 'admin', '$2a$10$gw46pmsOVYO.smHYQ2jH.OoXoe.lGP8OStDkHNs/E74GqZDL5K7ki', 'ROLE_ACTIVITI_ADMIN'); 21 | INSERT INTO `user` VALUES ('2', 'bajiecn', 'shanghang', 'bajie', '$2a$10$gw46pmsOVYO.smHYQ2jH.OoXoe.lGP8OStDkHNs/E74GqZDL5K7ki', 'ROLE_ACTIVITI_USER,GROUP_activitiTeam,g_bajiewukong'); 22 | INSERT INTO `user` VALUES ('3', 'wukongcn', 'beijing', 'wukong', '$2a$10$gw46pmsOVYO.smHYQ2jH.OoXoe.lGP8OStDkHNs/E74GqZDL5K7ki', 'ROLE_ACTIVITI_USER,GROUP_activitiTeam'); 23 | INSERT INTO `user` VALUES ('4', 'salaboycn', 'beijing', 'salaboy', '$2a$10$gw46pmsOVYO.smHYQ2jH.OoXoe.lGP8OStDkHNs/E74GqZDL5K7ki', 'ROLE_ACTIVITI_USER,GROUP_activitiTeam'); 24 | 25 | -- ---------------------------- 26 | -- 修复Activiti7的M4版本缺失字段Bug 27 | -- ---------------------------- 28 | alter table ACT_RE_DEPLOYMENT add column PROJECT_RELEASE_VERSION_ varchar(255) DEFAULT NULL; 29 | alter table ACT_RE_DEPLOYMENT add column VERSION_ varchar(255) DEFAULT NULL; 30 | 31 | -- ---------------------------- 32 | -- 动态表单数据存储 33 | -- ---------------------------- 34 | DROP TABLE IF EXISTS `formdata`; 35 | CREATE TABLE `formdata` ( 36 | `PROC_DEF_ID_` varchar(64) DEFAULT NULL, 37 | `PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL, 38 | `FORM_KEY_` varchar(255) DEFAULT NULL, 39 | `Control_ID_` varchar(100) DEFAULT NULL, 40 | `Control_VALUE_` varchar(2000) DEFAULT NULL 41 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 42 | --------------------------------------------------------------------------------