Composite Web services technologies are widely used due to their ability to provide interoperability among services from different companies. Web services are usually stateless, which means that no state is stored from the clients viewpoint. However, some new applications and services have emerged, which require to capture the state of some resources. Thus, new standards to model Web services states have appeared, such as Open Grid Services Infrastructure (OGSI), which became Web Services Resource Framework (WSRF). In this paper, we present a formal model based on WS-BPEL and WSRF, and we provide a prioritised-timed coloured Petri net semantics for it. This semantics captures the main activities of BPEL, but we also consider other important aspects, both from BPEL and WSRF, such as the fault and event handlers, time-outs and the WSRF publish-subscribe system.