Is it possible to define sharepoint workflows from powershell? - powershell

I am able to create workflows using SharePoint designer; however, can this (including the adding of actions and conditions) also be accomplished in PowerShell? Is this demonstrated in a book or in some resource online?

Short Answer:
No
Long Answer
Sharepoint 2013 Workflows uses the Workflow Manager service. Windows Workflow Foundation (WF), in turn, is built on the messaging functionality that is provided by Windows Communication Foundation (WCF).
Workflows are a structured collection of workflow "activities," each of which represents a functional component of a business process.
The activities, which are implementations of activity classes, are implemented declaratively by using XAML.
See MSDN
XAML file is like an XML file, so if you want you can edit this file in PowerShell as if it were an XML file, but I think is better to use Sharepoint Designer or Visual Studio.

Related

Running customized (non-BPMN) process definitions with Activiti

We are evaluating Activiti as a process engine to replace our existing home grown work flow engine. We are quite impressed by the capabilities of Activiti especially related to multi tenancy and REST WS.
However, one of the biggest challenge (and probably blocker) to adopt Activiti would be - How we can run or migrate our existing work flow definitions.
As I mentioned earlier, our work flow solution is a home grown one and doesn't adheres to BPMN specifications. There are thousands of templates out there. We can't simply ask our customers to redefine their templates using Activiti. These definitions are stored in proprietary XML format.
Looking at the level of customization in the templates, it would be very difficult to migrate these definitions to BPMN format.
So, does Activiti provides any hooks to run such custom templates. Alternatively, please share your thoughts about migrating the templates from proprietary format to BPMN format.
I suppose such scenario would be common and other people would have faced the same.
I know I am being very vague with this query but at this stage I don't have specific problems that I can discuss.
One option is implement your own proprietary XML parser and parser handlers. Look at org.activiti.engine.impl.bpmn.parser.BpmnParse and org.activiti.engine.impl.bpmn.parser.handler.AbstractBpmnParseHandler and its descendants.
We did it and worked fine.

SharePoint 2013 APIs

Looking for somewhere that describes the differences between the SharePoint 2013 APIs, specifically I'm wondering what APIs I can use to create databases and site collections. As far as I can tell, only the Server API or Powershell will let me do that. I was hoping I could be proved wrong and be able to use the client object model or the REST services. Anyone know for sure?
No only server-side OM offers these kind of operations. Both CSOM and REST are built to deal with data and services hosted within SharePoint.
Here is an MSDN article which best describes what you are looking for:
http://msdn.microsoft.com/en-us/library/sharepoint/jj164060.aspx
The largest set of APIs is in the server object model of managed
classes. At the level of SharePoint Foundation 2013, this object model
includes classes and members that enable programmatic control of the
basic site and list structure of SharePoint Foundation. Most of these
classes are in the Microsoft.SharePoint namespace. In addition, you
can extend almost every SharePoint Foundation component by using the
server object model, including workflows, alerts, Web Parts, basic
search, and Microsoft Business Connectivity Services (BCS). The server
object model also includes an extensive set of APIs enable extensions
of the administration and security system of SharePoint Foundation,
including backup, farm health and diagnostics, logging, farm and web
application management, upgrade, deployment, caching, and Windows
PowerShell customization.
The highlighted part is not available in other API.

alfresco workflow configurable and barcodes

i have a couple of questions on Alfresco.
Is Alfresco workflow module, point and click configurable or is programming needed?
Can Visio diagrams be used to set workflow?
Can Alfresco process 1-D and 2-D barcodes?
Regards
vish
Currently Alfresco workflows can be developed using the JBPM Graphical Process Designer, which produces XML files you directly upload into Alfresco. Be aware of the fact that in the future the default workflow engine of Alfresco will change to be Activiti.
Barcode generation/scanning is not supported by Alfresco.
At the Alfresco Devcon in New York (2010) Neil McErlean did a presentation on the Alfresco Action Framework where he demoed an example of working with QR codes.
The presentation can be found at http://www.slideshare.net/alfresco/custom-action-framework
I am not sure where the source code lives for this customization. So while it can't be done OTB, it is a customization that is possible and has been done as a POC.
More recently, the Activiti workflow engine is the default in Alfresco (though jBPM is still available). There is an Eclipse plugin that can be used to do the initial workflow design graphically (and output BPMN XML files).
However, the BPMN is not useful until it has been manually enhanced with Alfresco-specific features such as the assignee (person or group) for a task, the form to use to display the task, and scripts to create and maintain process and task variables, and/or hook into events triggered during the workflow. Further work may be needed to define the task model (the variables that each type of task needs) and to customise the Share user interface to display the tasks correctly to users. See this article for an example.
So although the initial draft design can be done graphically, detailed programming is also needed. The Alfresco training materials for workflows specifically state that end users cannot create new workflows without assistance from a developer.
The exception is "simple workflows", which don't use BPMN or jBPM, and are simple one-step Accept/Reject decisions that can be created by end users.
You can use whatever BPMN tool as long as it generates an xml BPMN xml output so you can import it into Alfresco activiti

Searching workflow/process tool based on ZF

Does anyone know a workflow system based on Zend (or php), which is open source and can be integrated in a project? What do I understand as workflow system:
User starts a workflow through submitting some start parameter (e.g. SOAP/HTML request)
Zend runs the workflow in the background (on high server load the operations are lined up in a queue)
Workflow may be build out of several modules/actions e.g. export xml > create pdf > send pdf to user > send email (Backend)
User sees current status of the running workflow online and gets the result as soon as finished through ajax requests to the server. (User Interface)
Admin has a overview of general running workflows (Admin Interface)
Thanks for your hints!
If I understand correctly, the workflow is just a pre-defined set of actions.
I don't believe there is a ready tool for this, but I think you may be interested in running a set of cron jobs from the Zend Framework CLI (e.g. building your own Zend_Tool Provider) and in Zend_Queue.
You might want to use the right tool for such task - eg. Gearman. It is a piece of software solely for the requirements you described. See more here:
http://www.slideshare.net/felixdv/high-gear-php-with-gearman
http://weierophinney.net/matthew/archives/240-Writing-Gearman-Workers-in-PHP.html
You may want to try eZ Components Workflow library: http://www.ezcomponents.org/docs/api/trunk/introduction_Workflow.html
This post describes how to integrate the eZ Components library with Zend:
http://devzone.zend.com/article/156
Other than that I haven't found any real examples of integrating the eZ workflow classes with a Zend MVC application.
Symfony has a component for this. http://symfony.com/doc/current/components/workflow.html
Oro platform has a bundle for this.
https://github.com/oroinc/platform/blob/master/src/Oro/Bundle/WorkflowBundle/Resources/doc/index.md
Otherwise, you could build your own implementation based on maybe the State design pattern. Here is a nice example from Sebastian Bergman.
https://github.com/sebastianbergmann/state

Sharepoint hosted CRUD Application? (Entity Framework?)

I am going to create a basic "CRUD" application that will "live" inside Sharepoint 2010. The data will be hosted on a SQL 2008 R2 Server.
Basically, there will be a few "Add" forms, some Queries and some Reporting (SSRS).
Honestly, the application doesn't really even need Sharepoint, but we are trying to get as many of these applications hosted inside Sharepoint as possible. (The application is currently a Microsoft Access application.)
I have experience creating these types of applications (ASP .Net) and have recently been using the Entity Framework. Generally, I design my Data Layer in a seperate Visual Studio Project (using EF) and then extendthe partial classes it creates and/or sometimes create another POCO layer to access the data (depending on how much "business logic" there is).
Anyway, the question I have is:
If I create a (Visual Studio) Solution (I know I have to target .Net 3.5, since because SP doesn't support 4.0 yet), can I use my usual "layered" design and create a seperate project (assembly) that conaints all of my Data Access (Entity Framework) and then have a seperate Project that contains all of the Visual Web Parts (that we design the Data Entry Forms in)? Will this work? Will I be able to call the exposed methods from the (EF) DAL from within the Visual Web Parts (after I deploy my solution to the SP Server)? Will I have to do anything "special" or will both projects get packaged up into a (what is it) "wsp" file and get deployed to SP? (Or, will I have to manually get my DAL Assembly added to the GAC, etc.)
Any examples or tutorials would be a big help to me too.
Also, if you think I am going about this all wrong, I am also interested in knowing how you would create a similar appliation. Is there a better way to do this? (I know I could create a BDC Model and access our SQL data via a Sharepoint List using the External Content Type. Although, for some reason it just seems like that isn't the "right path" for this particular application... I can't put my finger on it, but I am leaning toward just creating a "traditional" ASP .Net app that just uses SharePoint as its "hosting web server".)
Thanks!
Shayne
Can you do it: yes. Should you do it: probably not.
You hit it on the head. You are creating and ASP.NET application, not a SharePoint application.
Anyway, assuming you are going to have to proceed in this manner, here's my advice.
Build the presentation layer (web parts, application pages) using the SharePoint project template and SharePoint project items. This project can reference the assemblies that implement the remaining layers of your application. Visual Studio will then prepare a Solution Package (WSP) that can be used in testing and deployed to production servers.
You should do everything you can to make your application "fit" into SharePoint. It should use the same UI metaphors, respect branding, and so on. Nothing is more jarring to a user then to have pages and web parts that look and behave total different to SharePoint in the middle of a SharePoint site.
If you have the full version of sharepoint you can use Access Services, which will convert your Access application to a web app, just run the wizard
see this video for details: http://channel9.msdn.com/Shows/Access/Microsoft-Access-2010-Demo